Getting Started

This is a quick R-based replication attempt at Botero et al. (2015), as a prelude to studying whole mitogenome patterns in the SMAGL study subjects.

Let’s import data first…

I’ve downloaded all the Lagothrix sequences belonging to the accession numbers indicated from GenBank (I’ve actually did this using the PopSet setting on NCBI, which has now unfortunately been deprecated). These have been saved as FASTA files for each set generated by Botero (accession numbers starting with GU) and Di Fiore (accession numbers starting with KF), respectively:

library(tidyverse)
library(Biostrings)
lagomito1<-readDNAStringSet("~/Desktop/woolly_genomics/mitogenomes/Lagothrix_mitogenomes/Botero_GUset_Dloop.fasta")
lagomito2<-readDNAStringSet("~/Desktop/woolly_genomics/mitogenomes/Lagothrix_mitogenomes/Botero_KFset_Dloop.fasta")

Let’s now run our alignment, effectively merging our two sequencing files (we’ll also first orient our sequences, to make sure they’re all running in the same direction!):

library(DECIPHER)
lagomito1<-OrientNucleotides(lagomito1)
## ========================================================================================================================
## 
## Time difference of 0.03 secs
lagomito2<-OrientNucleotides(lagomito2)
## ========================================================================================================================
## 
## Time difference of 0.04 secs
#Run the alignment
lagomito.aln.pre<-AlignSeqs(c(lagomito1,lagomito2))
## Determining distance matrix based on shared 9-mers:
## ================================================================================
## 
## Time difference of 0.05 secs
## 
## Clustering into groups by similarity:
## ================================================================================
## 
## Time difference of 0.02 secs
## 
## Aligning Sequences:
## ================================================================================
## 
## Time difference of 0.39 secs
## 
## Iteration 1 of 2:
## 
## Determining distance matrix based on alignment:
## ================================================================================
## 
## Time difference of 0.01 secs
## 
## Reclustering into groups by similarity:
## ================================================================================
## 
## Time difference of 0.03 secs
## 
## Realigning Sequences:
## ================================================================================
## 
## Time difference of 0.14 secs
## 
## Alignment converged - skipping remaining iteration.

Let’s see how many sequences we have for each:

length(lagomito1)
## [1] 88
length(lagomito2)
## [1] 54
length(lagomito.aln.pre)
## [1] 142

And also how long the sequences in the alignment are:

lagomito.aln.pre
## DNAStringSet object of length 142:
##       width seq                                             names               
##   [1]   431 GTATATCATTGAAGGCTTTGCC...ACCCGCCCACATTTGCCGCTCT GU212679.1 Lagoth...
##   [2]   431 GTATATCATTGAAGGCTTTGCC...ACCCGCCCACATTTGCCGCTCT GU212680.1 Lagoth...
##   [3]   431 GTATATCATTGAAGGCTTTGCC...ACCCGCCCACATTTGCCGCTCT GU212681.1 Lagoth...
##   [4]   431 GTATATCATTGAAGGCTTTGCC...ACCCGCCCACATTTGCCGCTCT GU212682.1 Lagoth...
##   [5]   431 GTATATCATTGAAGGCTTTGCC...ACCCGCCCACATTTGCCGCTCT GU212683.1 Lagoth...
##   ...   ... ...
## [138]   431 GTATATCATTGAAGGCTTTGCC...ACCCGCCCACATTTGCCGCTCT KF704232.1 Lagoth...
## [139]   431 GTATATCATTGAAGGCTTTGCC...ACCCGCCCACATTTGCCGCTCT KF704233.1 Lagoth...
## [140]   431 GTATATCATTGAAGGCTTTGCC...ACCCGCCCACATTTGCCGCTCT KF704234.1 Lagoth...
## [141]   431 GTATATCATTGAAGGCTCTGCC...ACCCGCCCACATTTGCCGCTCT KF704235.1 Lagoth...
## [142]   431 GTATATCATTGAAGGCTCTGCC...ACCCGCCCACATTTGCCGCTCT KF704236.1 Lagoth...

As you can see, this fragment is 431 bp in the mitochondrial D-loop.

Let’s also change the names of the sequences… at the moment, they’re a bit complex:

names(lagomito.aln.pre)
##   [1] "GU212679.1 Lagothrix lagotricha isolate S1 D-loop, partial sequence; mitochondrial"    
##   [2] "GU212680.1 Lagothrix lagotricha isolate B1 D-loop, partial sequence; mitochondrial"    
##   [3] "GU212681.1 Lagothrix lagotricha isolate P1 D-loop, partial sequence; mitochondrial"    
##   [4] "GU212682.1 Lagothrix lagotricha isolate P2 D-loop, partial sequence; mitochondrial"    
##   [5] "GU212683.1 Lagothrix lagotricha isolate D1 D-loop, partial sequence; mitochondrial"    
##   [6] "GU212684.1 Lagothrix lagotricha isolate M1 D-loop, partial sequence; mitochondrial"    
##   [7] "GU212685.1 Lagothrix lugens isolate M2 D-loop, partial sequence; mitochondrial"        
##   [8] "GU212686.1 Lagothrix lugens isolate M3 D-loop, partial sequence; mitochondrial"        
##   [9] "GU212687.1 Lagothrix lugens isolate S3 D-loop, partial sequence; mitochondrial"        
##  [10] "GU212688.1 Lagothrix lugens isolate D2 D-loop, partial sequence; mitochondrial"        
##  [11] "GU212689.1 Lagothrix lugens isolate S2 D-loop, partial sequence; mitochondrial"        
##  [12] "GU212690.1 Lagothrix lugens isolate v3 D-loop, partial sequence; mitochondrial"        
##  [13] "GU212691.1 Lagothrix lugens isolate B2 D-loop, partial sequence; mitochondrial"        
##  [14] "GU212692.1 Lagothrix lugens isolate v4 D-loop, partial sequence; mitochondrial"        
##  [15] "GU212693.1 Lagothrix lugens isolate v2 D-loop, partial sequence; mitochondrial"        
##  [16] "GU212694.1 Lagothrix lugens isolate V1 D-loop, partial sequence; mitochondrial"        
##  [17] "GU212712.1 Lagothrix lagotricha isolate Z5 D-loop, partial sequence; mitochondrial"    
##  [18] "GU212713.1 Lagothrix lagotricha isolate Z6 D-loop, partial sequence; mitochondrial"    
##  [19] "GU212714.1 Lagothrix lagotricha isolate Z7 D-loop, partial sequence; mitochondrial"    
##  [20] "GU212715.1 Lagothrix lagotricha isolate Z8 D-loop, partial sequence; mitochondrial"    
##  [21] "GU212716.1 Lagothrix lagotricha isolate Z9 D-loop, partial sequence; mitochondrial"    
##  [22] "GU212717.1 Lagothrix lagotricha isolate Z10 D-loop, partial sequence; mitochondrial"   
##  [23] "GU212718.1 Lagothrix lagotricha isolate Z11 D-loop, partial sequence; mitochondrial"   
##  [24] "GU212719.1 Lagothrix lagotricha isolate Z12 D-loop, partial sequence; mitochondrial"   
##  [25] "GU212720.1 Lagothrix lagotricha isolate Z13 D-loop, partial sequence; mitochondrial"   
##  [26] "GU212721.1 Lagothrix lagotricha isolate Z14 D-loop, partial sequence; mitochondrial"   
##  [27] "GU212722.1 Lagothrix lagotricha isolate Z15 D-loop, partial sequence; mitochondrial"   
##  [28] "GU212723.1 Lagothrix lagotricha isolate Z16 D-loop, partial sequence; mitochondrial"   
##  [29] "GU212724.1 Lagothrix lagotricha isolate Z17 D-loop, partial sequence; mitochondrial"   
##  [30] "GU212725.1 Lagothrix lagotricha isolate Z18 D-loop, partial sequence; mitochondrial"   
##  [31] "GU212726.1 Lagothrix lagotricha isolate Z19 D-loop, partial sequence; mitochondrial"   
##  [32] "GU212727.1 Lagothrix lagotricha isolate Z21 D-loop, partial sequence; mitochondrial"   
##  [33] "GU212728.1 Lagothrix lagotricha isolate C1 D-loop, partial sequence; mitochondrial"    
##  [34] "GU212729.1 Lagothrix lagotricha isolate C2 D-loop, partial sequence; mitochondrial"    
##  [35] "GU212730.1 Lagothrix lagotricha isolate C6 D-loop, partial sequence; mitochondrial"    
##  [36] "GU212731.1 Lagothrix lagotricha isolate C7 D-loop, partial sequence; mitochondrial"    
##  [37] "GU212732.1 Lagothrix lagotricha isolate C8 D-loop, partial sequence; mitochondrial"    
##  [38] "GU212733.1 Lagothrix lagotricha isolate C10 D-loop, partial sequence; mitochondrial"   
##  [39] "GU212734.1 Lagothrix lagotricha isolate C11 D-loop, partial sequence; mitochondrial"   
##  [40] "GU212735.1 Lagothrix lagotricha isolate C12 D-loop, partial sequence; mitochondrial"   
##  [41] "GU212736.1 Lagothrix lagotricha isolate C13 D-loop, partial sequence; mitochondrial"   
##  [42] "GU212737.1 Lagothrix lagotricha isolate G3 D-loop, partial sequence; mitochondrial"    
##  [43] "GU212738.1 Lagothrix lagotricha isolate G6 D-loop, partial sequence; mitochondrial"    
##  [44] "GU212739.1 Lagothrix lagotricha isolate G7 D-loop, partial sequence; mitochondrial"    
##  [45] "GU212740.1 Lagothrix lagotricha isolate G32 D-loop, partial sequence; mitochondrial"   
##  [46] "GU212741.1 Lagothrix lagotricha isolate G35 D-loop, partial sequence; mitochondrial"   
##  [47] "GU212742.1 Lagothrix lagotricha isolate G13a D-loop, partial sequence; mitochondrial"  
##  [48] "GU212743.1 Lagothrix lagotricha isolate G20a D-loop, partial sequence; mitochondrial"  
##  [49] "GU212744.1 Lagothrix lagotricha isolate G25a D-loop, partial sequence; mitochondrial"  
##  [50] "GU212745.1 Lagothrix lagotricha isolate G41j D-loop, partial sequence; mitochondrial"  
##  [51] "GU212746.1 Lagothrix lagotricha isolate H1 D-loop, partial sequence; mitochondrial"    
##  [52] "GU212747.1 Lagothrix lagotricha isolate H8 D-loop, partial sequence; mitochondrial"    
##  [53] "GU212748.1 Lagothrix lagotricha isolate H9 D-loop, partial sequence; mitochondrial"    
##  [54] "GU212749.1 Lagothrix lagotricha isolate H11 D-loop, partial sequence; mitochondrial"   
##  [55] "GU212750.1 Lagothrix lagotricha isolate H14 D-loop, partial sequence; mitochondrial"   
##  [56] "GU212751.1 Lagothrix lagotricha isolate H15 D-loop, partial sequence; mitochondrial"   
##  [57] "GU212752.1 Lagothrix lagotricha isolate H16 D-loop, partial sequence; mitochondrial"   
##  [58] "GU212753.1 Lagothrix lagotricha isolate H17 D-loop, partial sequence; mitochondrial"   
##  [59] "GU212754.1 Lagothrix lagotricha isolate H18 D-loop, partial sequence; mitochondrial"   
##  [60] "GU212755.1 Lagothrix lagotricha isolate H20 D-loop, partial sequence; mitochondrial"   
##  [61] "GU212756.1 Lagothrix lagotricha isolate H21 D-loop, partial sequence; mitochondrial"   
##  [62] "GU212757.1 Lagothrix lagotricha isolate M2 D-loop, partial sequence; mitochondrial"    
##  [63] "GU212758.1 Lagothrix lagotricha isolate M3 D-loop, partial sequence; mitochondrial"    
##  [64] "GU212759.1 Lagothrix lagotricha isolate M4 D-loop, partial sequence; mitochondrial"    
##  [65] "GU212760.1 Lagothrix lagotricha isolate M5 D-loop, partial sequence; mitochondrial"    
##  [66] "GU212761.1 Lagothrix lagotricha isolate M7 D-loop, partial sequence; mitochondrial"    
##  [67] "GU212762.1 Lagothrix lagotricha isolate M10 D-loop, partial sequence; mitochondrial"   
##  [68] "GU212763.1 Lagothrix lagotricha isolate M11 D-loop, partial sequence; mitochondrial"   
##  [69] "GU212764.1 Lagothrix lagotricha isolate M13 D-loop, partial sequence; mitochondrial"   
##  [70] "GU212765.1 Lagothrix lagotricha isolate M17 D-loop, partial sequence; mitochondrial"   
##  [71] "GU212766.1 Lagothrix lagotricha isolate M18 D-loop, partial sequence; mitochondrial"   
##  [72] "GU212767.1 Lagothrix lagotricha isolate M20 D-loop, partial sequence; mitochondrial"   
##  [73] "GU212768.1 Lagothrix lagotricha isolate M21 D-loop, partial sequence; mitochondrial"   
##  [74] "GU212769.1 Lagothrix lagotricha isolate M25 D-loop, partial sequence; mitochondrial"   
##  [75] "GU212770.1 Lagothrix lagotricha isolate M26 D-loop, partial sequence; mitochondrial"   
##  [76] "GU212771.1 Lagothrix lagotricha isolate M27 D-loop, partial sequence; mitochondrial"   
##  [77] "GU212772.1 Lagothrix lagotricha isolate M28 D-loop, partial sequence; mitochondrial"   
##  [78] "GU212773.1 Lagothrix lagotricha isolate M29 D-loop, partial sequence; mitochondrial"   
##  [79] "GU212774.1 Lagothrix lagotricha isolate V2 D-loop, partial sequence; mitochondrial"    
##  [80] "GU212775.1 Lagothrix lagotricha isolate V4 D-loop, partial sequence; mitochondrial"    
##  [81] "GU212777.1 Lagothrix lagotricha isolate V7 D-loop, partial sequence; mitochondrial"    
##  [82] "GU212776.1 Lagothrix lagotricha isolate V6 D-loop, partial sequence; mitochondrial"    
##  [83] "GU212778.1 Lagothrix lagotricha isolate V8 D-loop, partial sequence; mitochondrial"    
##  [84] "GU212779.1 Lagothrix lagotricha isolate V11 D-loop, partial sequence; mitochondrial"   
##  [85] "GU212780.1 Lagothrix lagotricha isolate V12 D-loop, partial sequence; mitochondrial"   
##  [86] "GU212781.1 Lagothrix lagotricha isolate V13 D-loop, partial sequence; mitochondrial"   
##  [87] "GU212782.1 Lagothrix lagotricha isolate V15 D-loop, partial sequence; mitochondrial"   
##  [88] "GU212783.1 Lagothrix lagotricha isolate V16 D-loop, partial sequence; mitochondrial"   
##  [89] "KF704183.1 Lagothrix poeppigii isolate PrT37 D-loop, complete sequence; mitochondrial" 
##  [90] "KF704184.1 Lagothrix poeppigii isolate PrT79 D-loop, complete sequence; mitochondrial" 
##  [91] "KF704185.1 Lagothrix poeppigii isolate PrT1 D-loop, complete sequence; mitochondrial"  
##  [92] "KF704186.1 Lagothrix poeppigii isolate PrT2 D-loop, complete sequence; mitochondrial"  
##  [93] "KF704187.1 Lagothrix poeppigii isolate PrT13 D-loop, complete sequence; mitochondrial" 
##  [94] "KF704188.1 Lagothrix poeppigii isolate PrT15 D-loop, complete sequence; mitochondrial" 
##  [95] "KF704189.1 Lagothrix poeppigii isolate PrT16 D-loop, complete sequence; mitochondrial" 
##  [96] "KF704190.1 Lagothrix poeppigii isolate PrT17 D-loop, complete sequence; mitochondrial" 
##  [97] "KF704191.1 Lagothrix poeppigii isolate PrT82 D-loop, complete sequence; mitochondrial" 
##  [98] "KF704192.1 Lagothrix poeppigii isolate PrT83 D-loop, complete sequence; mitochondrial" 
##  [99] "KF704193.1 Lagothrix poeppigii isolate PrT90 D-loop, complete sequence; mitochondrial" 
## [100] "KF704194.1 Lagothrix poeppigii isolate PrT91 D-loop, complete sequence; mitochondrial" 
## [101] "KF704195.1 Lagothrix poeppigii isolate PrT94 D-loop, complete sequence; mitochondrial" 
## [102] "KF704196.1 Lagothrix poeppigii isolate PrT102 D-loop, complete sequence; mitochondrial"
## [103] "KF704197.1 Lagothrix poeppigii isolate PrT6 D-loop, complete sequence; mitochondrial"  
## [104] "KF704198.1 Lagothrix poeppigii isolate PrT25 D-loop, complete sequence; mitochondrial" 
## [105] "KF704199.1 Lagothrix poeppigii isolate PrT26 D-loop, complete sequence; mitochondrial" 
## [106] "KF704200.1 Lagothrix poeppigii isolate PrT35 D-loop, complete sequence; mitochondrial" 
## [107] "KF704201.1 Lagothrix poeppigii isolate PrT40 D-loop, complete sequence; mitochondrial" 
## [108] "KF704202.1 Lagothrix poeppigii isolate PrT43 D-loop, complete sequence; mitochondrial" 
## [109] "KF704203.1 Lagothrix poeppigii isolate PrT61 D-loop, complete sequence; mitochondrial" 
## [110] "KF704204.1 Lagothrix poeppigii isolate PrT65 D-loop, complete sequence; mitochondrial" 
## [111] "KF704205.1 Lagothrix poeppigii isolate PrT67 D-loop, complete sequence; mitochondrial" 
## [112] "KF704206.1 Lagothrix poeppigii isolate PrT68 D-loop, complete sequence; mitochondrial" 
## [113] "KF704207.1 Lagothrix poeppigii isolate PrT69 D-loop, complete sequence; mitochondrial" 
## [114] "KF704208.1 Lagothrix poeppigii isolate PrT75 D-loop, complete sequence; mitochondrial" 
## [115] "KF704209.1 Lagothrix poeppigii isolate PrT76 D-loop, complete sequence; mitochondrial" 
## [116] "KF704210.1 Lagothrix poeppigii isolate PrT103 D-loop, complete sequence; mitochondrial"
## [117] "KF704211.1 Lagothrix poeppigii isolate PrT111 D-loop, complete sequence; mitochondrial"
## [118] "KF704212.1 Lagothrix poeppigii isolate PrT126 D-loop, complete sequence; mitochondrial"
## [119] "KF704213.1 Lagothrix poeppigii isolate PrT59 D-loop, complete sequence; mitochondrial" 
## [120] "KF704214.1 Lagothrix poeppigii isolate PrF6 D-loop, complete sequence; mitochondrial"  
## [121] "KF704215.1 Lagothrix poeppigii isolate PrT47 D-loop, complete sequence; mitochondrial" 
## [122] "KF704216.1 Lagothrix poeppigii isolate PrT21 D-loop, complete sequence; mitochondrial" 
## [123] "KF704217.1 Lagothrix poeppigii isolate PrT30 D-loop, complete sequence; mitochondrial" 
## [124] "KF704218.1 Lagothrix poeppigii isolate PrT106 D-loop, complete sequence; mitochondrial"
## [125] "KF704219.1 Lagothrix poeppigii isolate PrT95 D-loop, complete sequence; mitochondrial" 
## [126] "KF704220.1 Lagothrix poeppigii isolate T189 D-loop, complete sequence; mitochondrial"  
## [127] "KF704221.1 Lagothrix poeppigii isolate T191 D-loop, complete sequence; mitochondrial"  
## [128] "KF704222.1 Lagothrix poeppigii isolate T192 D-loop, complete sequence; mitochondrial"  
## [129] "KF704223.1 Lagothrix poeppigii isolate T142 D-loop, complete sequence; mitochondrial"  
## [130] "KF704224.1 Lagothrix poeppigii isolate T179 D-loop, complete sequence; mitochondrial"  
## [131] "KF704225.1 Lagothrix poeppigii isolate T180 D-loop, complete sequence; mitochondrial"  
## [132] "KF704226.1 Lagothrix poeppigii isolate T181 D-loop, complete sequence; mitochondrial"  
## [133] "KF704227.1 Lagothrix poeppigii isolate T183 D-loop, complete sequence; mitochondrial"  
## [134] "KF704228.1 Lagothrix poeppigii isolate T155 D-loop, complete sequence; mitochondrial"  
## [135] "KF704229.1 Lagothrix poeppigii isolate T156 D-loop, complete sequence; mitochondrial"  
## [136] "KF704230.1 Lagothrix poeppigii isolate T159 D-loop, complete sequence; mitochondrial"  
## [137] "KF704231.1 Lagothrix poeppigii isolate T162 D-loop, complete sequence; mitochondrial"  
## [138] "KF704232.1 Lagothrix poeppigii isolate T168 D-loop, complete sequence; mitochondrial"  
## [139] "KF704233.1 Lagothrix poeppigii isolate T169 D-loop, complete sequence; mitochondrial"  
## [140] "KF704234.1 Lagothrix poeppigii isolate T171 D-loop, complete sequence; mitochondrial"  
## [141] "KF704235.1 Lagothrix poeppigii isolate T172 D-loop, complete sequence; mitochondrial"  
## [142] "KF704236.1 Lagothrix poeppigii isolate T185 D-loop, complete sequence; mitochondrial"

Let’s only keep the GenBank accession number by erasing most of the text using the substr command to choose only characters 1-10 of the name:

names(lagomito.aln.pre)<-substr(names(lagomito.aln.pre),1,10)
names(lagomito.aln.pre)
##   [1] "GU212679.1" "GU212680.1" "GU212681.1" "GU212682.1" "GU212683.1"
##   [6] "GU212684.1" "GU212685.1" "GU212686.1" "GU212687.1" "GU212688.1"
##  [11] "GU212689.1" "GU212690.1" "GU212691.1" "GU212692.1" "GU212693.1"
##  [16] "GU212694.1" "GU212712.1" "GU212713.1" "GU212714.1" "GU212715.1"
##  [21] "GU212716.1" "GU212717.1" "GU212718.1" "GU212719.1" "GU212720.1"
##  [26] "GU212721.1" "GU212722.1" "GU212723.1" "GU212724.1" "GU212725.1"
##  [31] "GU212726.1" "GU212727.1" "GU212728.1" "GU212729.1" "GU212730.1"
##  [36] "GU212731.1" "GU212732.1" "GU212733.1" "GU212734.1" "GU212735.1"
##  [41] "GU212736.1" "GU212737.1" "GU212738.1" "GU212739.1" "GU212740.1"
##  [46] "GU212741.1" "GU212742.1" "GU212743.1" "GU212744.1" "GU212745.1"
##  [51] "GU212746.1" "GU212747.1" "GU212748.1" "GU212749.1" "GU212750.1"
##  [56] "GU212751.1" "GU212752.1" "GU212753.1" "GU212754.1" "GU212755.1"
##  [61] "GU212756.1" "GU212757.1" "GU212758.1" "GU212759.1" "GU212760.1"
##  [66] "GU212761.1" "GU212762.1" "GU212763.1" "GU212764.1" "GU212765.1"
##  [71] "GU212766.1" "GU212767.1" "GU212768.1" "GU212769.1" "GU212770.1"
##  [76] "GU212771.1" "GU212772.1" "GU212773.1" "GU212774.1" "GU212775.1"
##  [81] "GU212777.1" "GU212776.1" "GU212778.1" "GU212779.1" "GU212780.1"
##  [86] "GU212781.1" "GU212782.1" "GU212783.1" "KF704183.1" "KF704184.1"
##  [91] "KF704185.1" "KF704186.1" "KF704187.1" "KF704188.1" "KF704189.1"
##  [96] "KF704190.1" "KF704191.1" "KF704192.1" "KF704193.1" "KF704194.1"
## [101] "KF704195.1" "KF704196.1" "KF704197.1" "KF704198.1" "KF704199.1"
## [106] "KF704200.1" "KF704201.1" "KF704202.1" "KF704203.1" "KF704204.1"
## [111] "KF704205.1" "KF704206.1" "KF704207.1" "KF704208.1" "KF704209.1"
## [116] "KF704210.1" "KF704211.1" "KF704212.1" "KF704213.1" "KF704214.1"
## [121] "KF704215.1" "KF704216.1" "KF704217.1" "KF704218.1" "KF704219.1"
## [126] "KF704220.1" "KF704221.1" "KF704222.1" "KF704223.1" "KF704224.1"
## [131] "KF704225.1" "KF704226.1" "KF704227.1" "KF704228.1" "KF704229.1"
## [136] "KF704230.1" "KF704231.1" "KF704232.1" "KF704233.1" "KF704234.1"
## [141] "KF704235.1" "KF704236.1"

Now, importantly, there are more sequences in the accessions from GenBank than are actually analyzed in Botero et al. (2015) - which only analyzed 126 sequences overall, 54 from Tony and only 72 from Sergio - so we do need to subset these sequences in order to truly replicate their analyses (it’s unclear why the remaining sequences were tossed).

To do that, let’s also import a text file I created that contains the sample and population information from Table 1 of Botero et al. (2015):

popinfo<-read.table("~/Desktop/woolly_genomics/mitogenomes/Lagothrix_mitogenomes/Botero_Info.txt", sep = ",", header=TRUE, comment.char = "#")
rownames(popinfo)<-popinfo$GenBank
popinfo
##               GenBank Population                 Taxon  Latitude Longitude
## KF704183.1 KF704183.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704184.1 KF704184.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704185.1 KF704185.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704186.1 KF704186.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704187.1 KF704187.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704188.1 KF704188.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704189.1 KF704189.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704190.1 KF704190.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704191.1 KF704191.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704192.1 KF704192.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704193.1 KF704193.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704194.1 KF704194.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704195.1 KF704195.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704196.1 KF704196.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704197.1 KF704197.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704198.1 KF704198.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704199.1 KF704199.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704200.1 KF704200.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704201.1 KF704201.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704202.1 KF704202.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704203.1 KF704203.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704204.1 KF704204.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704205.1 KF704205.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704206.1 KF704206.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704207.1 KF704207.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704208.1 KF704208.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704209.1 KF704209.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704210.1 KF704210.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704211.1 KF704211.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704212.1 KF704212.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704213.1 KF704213.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704214.1 KF704214.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704215.1 KF704215.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704216.1 KF704216.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704217.1 KF704217.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704218.1 KF704218.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704219.1 KF704219.1     Yasuní   Lagothrix poeppigii -0.700000 -76.46667
## KF704220.1 KF704220.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704221.1 KF704221.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704222.1 KF704222.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704223.1 KF704223.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704224.1 KF704224.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704225.1 KF704225.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704226.1 KF704226.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704227.1 KF704227.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704228.1 KF704228.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704229.1 KF704229.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704230.1 KF704230.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704231.1 KF704231.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704232.1 KF704232.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704233.1 KF704233.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704234.1 KF704234.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704235.1 KF704235.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## KF704236.1 KF704236.1   Tiputini   Lagothrix poeppigii -0.633333 -76.15000
## GU212712.1 GU212712.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212713.1 GU212713.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212714.1 GU212714.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212715.1 GU212715.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212716.1 GU212716.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212717.1 GU212717.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212718.1 GU212718.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212719.1 GU212719.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212720.1 GU212720.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212721.1 GU212721.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212722.1 GU212722.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212723.1 GU212723.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212724.1 GU212724.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212725.1 GU212725.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212726.1 GU212726.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212727.1 GU212727.1   Amazonas Lagothrix lagothricha -2.383333 -70.15000
## GU212774.1 GU212774.1     Vaupés Lagothrix lagothricha -1.066667 -69.50000
## GU212775.1 GU212775.1     Vaupés Lagothrix lagothricha -1.066667 -69.50000
## GU212776.1 GU212776.1     Vaupés Lagothrix lagothricha -1.066667 -69.50000
## GU212777.1 GU212777.1     Vaupés Lagothrix lagothricha -1.066667 -69.50000
## GU212778.1 GU212778.1     Vaupés Lagothrix lagothricha -1.066667 -69.50000
## GU212779.1 GU212779.1     Vaupés Lagothrix lagothricha -1.066667 -69.50000
## GU212780.1 GU212780.1     Vaupés Lagothrix lagothricha -1.066667 -69.50000
## GU212781.1 GU212781.1     Vaupés Lagothrix lagothricha -1.066667 -69.50000
## GU212782.1 GU212782.1     Vaupés Lagothrix lagothricha -1.066667 -69.50000
## GU212783.1 GU212783.1     Vaupés Lagothrix lagothricha -1.066667 -69.50000
## GU212737.1 GU212737.1   Guaviare      Lagothrix lugens  2.366667 -72.78333
## GU212738.1 GU212738.1   Guaviare      Lagothrix lugens  2.366667 -72.78333
## GU212739.1 GU212739.1   Guaviare      Lagothrix lugens  2.366667 -72.78333
## GU212740.1 GU212740.1   Guaviare      Lagothrix lugens  2.366667 -72.78333
## GU212741.1 GU212741.1   Guaviare      Lagothrix lugens  2.366667 -72.78333
## GU212742.1 GU212742.1   Guaviare      Lagothrix lugens  2.366667 -72.78333
## GU212743.1 GU212743.1   Guaviare      Lagothrix lugens  2.366667 -72.78333
## GU212744.1 GU212744.1   Guaviare      Lagothrix lugens  2.366667 -72.78333
## GU212745.1 GU212745.1   Guaviare      Lagothrix lugens  2.366667 -72.78333
## GU212757.1 GU212757.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212758.1 GU212758.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212759.1 GU212759.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212760.1 GU212760.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212761.1 GU212761.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212762.1 GU212762.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212763.1 GU212763.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212764.1 GU212764.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212765.1 GU212765.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212766.1 GU212766.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212767.1 GU212767.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212768.1 GU212768.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212769.1 GU212769.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212770.1 GU212770.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212771.1 GU212771.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212772.1 GU212772.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212773.1 GU212773.1       Meta      Lagothrix lugens  2.616667 -74.06667
## GU212728.1 GU212728.1    Caquetá      Lagothrix lugens  1.333333 -74.88333
## GU212729.1 GU212729.1    Caquetá      Lagothrix lugens  1.333333 -74.88333
## GU212730.1 GU212730.1    Caquetá      Lagothrix lugens  1.333333 -74.88333
## GU212731.1 GU212731.1    Caquetá      Lagothrix lugens  1.333333 -74.88333
## GU212732.1 GU212732.1    Caquetá      Lagothrix lugens  1.333333 -74.88333
## GU212733.1 GU212733.1    Caquetá      Lagothrix lugens  1.333333 -74.88333
## GU212734.1 GU212734.1    Caquetá      Lagothrix lugens  1.333333 -74.88333
## GU212735.1 GU212735.1    Caquetá      Lagothrix lugens  1.333333 -74.88333
## GU212736.1 GU212736.1    Caquetá      Lagothrix lugens  1.333333 -74.88333
## GU212746.1 GU212746.1      Huila      Lagothrix lugens  1.600000 -76.10000
## GU212747.1 GU212747.1      Huila      Lagothrix lugens  1.600000 -76.10000
## GU212748.1 GU212748.1      Huila      Lagothrix lugens  1.600000 -76.10000
## GU212749.1 GU212749.1      Huila      Lagothrix lugens  1.600000 -76.10000
## GU212750.1 GU212750.1      Huila      Lagothrix lugens  1.600000 -76.10000
## GU212751.1 GU212751.1      Huila      Lagothrix lugens  1.600000 -76.10000
## GU212752.1 GU212752.1      Huila      Lagothrix lugens  1.600000 -76.10000
## GU212753.1 GU212753.1      Huila      Lagothrix lugens  1.600000 -76.10000
## GU212754.1 GU212754.1      Huila      Lagothrix lugens  1.600000 -76.10000
## GU212755.1 GU212755.1      Huila      Lagothrix lugens  1.600000 -76.10000
## GU212756.1 GU212756.1      Huila      Lagothrix lugens  1.600000 -76.10000

From here, we can subset our alignment file by name to only include those for which we have population data from the paper (essentially just choosing those elements of lagomito.aln that are also named in the popinfo column called GenBank:

lagomito.aln<-lagomito.aln.pre[popinfo$GenBank]
length(lagomito.aln)
## [1] 126

Ok, that worked! Now our alignment contains just the sequences that are included in the Botero et al. (2015) analysis.

Haplotype Network

Now we’ll load the package we’ll use to construct our haplotype network, called {geneHapR}:

library(geneHapR)

And import our sequences into the format needed by the package:

hapResult <- seqs2hap(lagomito.aln,
                      Ref = names(lagomito.aln)[1],
                      hapPrefix = "H",
                      hetero_remove = TRUE,
                      na_drop = TRUE,
                      maxGapsPerSeq = 0.25)

We can then query how many of the sites in our 431 bp sequence are informing haplotype variation in our sample (in other words, how many segregating sites do we have):

sites(hapResult)
## [1] 88

Ok, so 88 sites are informing the haplotype results… let’s now get a summary of our haplotypes:

hapSummary <- hap_summary(hapResult)
print(hapSummary)
## 
## Accssions: 126
## Sites: 88
##   Indels: NA
##   SNPs:   88
## 
## Haplotypes: 61 
##   H001   8   GU212739.1, GU212760.1, GU212765.1, GU212766.1, GU212767.1, GU212768.1, ... 
##   H002   7   GU212737.1, GU212759.1, GU212763.1, GU212769.1, GU212770.1, GU212771.1, ... 
##   H003   5   KF704189.1, KF704200.1, KF704212.1, KF704214.1, KF704218.1  
##   H004   5   KF704193.1, KF704211.1, KF704213.1, KF704221.1, KF704223.1  
##   H005   4   KF704201.1, KF704202.1, KF704205.1, KF704207.1  
##   H006   4   GU212774.1, GU212775.1, GU212777.1, GU212781.1  
##   H007   4   GU212748.1, GU212753.1, GU212755.1, GU212756.1  
##   H008   4   GU212757.1, GU212758.1, GU212762.1, GU212764.1  
##   H009   4   GU212715.1, GU212718.1, GU212726.1, GU212727.1  
##   H010   4   GU212728.1, GU212732.1, GU212733.1, GU212735.1  
##   H011   3   GU212749.1, GU212750.1, GU212752.1  
##   H012   3   GU212716.1, GU212722.1, GU212724.1  
##   H013   3   GU212740.1, GU212742.1, GU212743.1  
##   H014   3   GU212730.1, GU212731.1, GU212736.1  
##   H015   3   KF704225.1, KF704232.1, KF704233.1  
##   H016   3   KF704184.1, KF704209.1, KF704216.1  
##   H017   3   KF704185.1, KF704190.1, KF704194.1  
##   H018   2   KF704235.1, KF704236.1  
##   H019   2   KF704183.1, KF704206.1  
##   H020   2   KF704220.1, KF704222.1  
##   H021   2   KF704191.1, KF704192.1  
##   H022   2   KF704187.1, KF704215.1  
##   H023   2   KF704186.1, KF704188.1  
##   H024   2   KF704198.1, KF704226.1  
##   H025   2   KF704203.1, KF704204.1  
##   H026   2   GU212776.1, GU212779.1  
##   H027   2   GU212729.1, GU212734.1  
##   H028   2   KF704197.1, KF704199.1  
##   H029   2   KF704228.1, KF704234.1  
##   H030   1   KF704224.1  
##   H031   1   KF704227.1  
##   H032   1   KF704231.1  
##   H033   1   GU212738.1  
##   H034   1   GU212778.1  
##   H035   1   KF704230.1  
##   H036   1   KF704195.1  
##   H037   1   GU212719.1  
##   H038   1   GU212714.1  
##   H039   1   GU212725.1  
##   H040   1   GU212783.1  
##   H041   1   GU212747.1  
##   H042   1   GU212741.1  
##   H043   1   GU212754.1  
##   H044   1   GU212761.1  
##   H045   1   GU212745.1  
##   H046   1   GU212744.1  
##   H047   1   GU212717.1  
##   H048   1   GU212782.1  
##   H049   1   GU212780.1  
##   H050   1   GU212713.1  
##   H051   1   GU212721.1  
##   H052   1   GU212720.1  
##   H053   1   GU212712.1  
##   H054   1   GU212723.1  
##   H055   1   GU212751.1  
##   H056   1   KF704210.1  
##   H057   1   KF704217.1  
##   H058   1   KF704208.1  
##   H059   1   KF704219.1  
##   H060   1   KF704196.1  
##   H061   1   KF704229.1  
##   
## Options:
##  hapPrefix:  H
##  hetero_remove:  YES
##  NA_remove:  YES
## 
## # A tibble: 65 × 91
##   Hap    `18`  `24`  `42`  `44`  `52`  `56`  `57`  `58`  `60`  `62`  `84`  `91` 
##   <chr>  <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 CHR    Chr0  Chr0  Chr0  Chr0  Chr0  Chr0  Chr0  Chr0  Chr0  Chr0  Chr0  Chr0 
## 2 POS    18    24    42    44    52    56    57    58    60    62    84    91   
## 3 INFO   <NA>  <NA>  <NA>  <NA>  <NA>  <NA>  <NA>  <NA>  <NA>  <NA>  <NA>  <NA> 
## 4 ALLELE C/T   T/C   T/C   T/C   A/G   C/T   C/A   T/C   G/A   C/T   C/T   T/C  
## 5 H001   T     T     C     T     G     T     C     T     G     C     T     T    
## 6 H002   T     T     C     T     G     T     C     T     G     C     T     T    
## 7 H003   T     T     T     T     A     C     C     T     A     C     C     T

With this output, not only can we see the sequence content (i.e., variants) in each haplotype, but we can also see which individuals belong to the same haplotype.

We can also plot a haplotype table if we want to visualize the variants, although it’s not super helpful given how cramped it is…

plotHapTable(hapSummary,
             title = "Lagothrix lagothricha D-Loop Haplotypes")

Now let’s calculate our haplotype network, importing our popinfo so that we can group our haplotypes by Population:

hapNet <- get_hapNet(hapSummary,
                     AccINFO = popinfo,
                     groupName = "Population")

And now let’s plot it to replicate Figure 2 in the Botero et al. paper (I’ve defined the colors to match those) :

plotHapNet(hapNet,
           size = "freq",                   # circle size
           scale = "log10",                 # scale circle with 'log10(size + 1)'
           cex = 1,                       # size of hap symbol
           col.link = 1,                    # link colors
           link.width = 1,                  # link widths
           show.mutation = 2,               # mutation types one of c(0,1,2,3)
           #hapGroup = 61,                   # draw pie charts for each haplotype
           legend = c(-15, 60),            # legend position
           show_color_legend = TRUE,
           show_size_legend = TRUE,
           labels = FALSE,
           pie.lim = c(2, 5),
           backGround=c("yellow","skyblue","purple4","limegreen","darkblue","purple","orange","red3"))        

As you can see, it more or less matches what the Botero et al. paper shows, with a couple confusing exceptions… and unfortunately this mapping isn’t as flexible as the program they apparently used, which is much more contained and aesthetically pleasing, but this gets the job done!

Population Genetics

For the population genetics analyses they do, we can use the {poppr} and {hierfstat} packages.

Convert to GENIND/GENlight

First, we need to convert our sequence data into GENIND and GENlight objects with our population data added as strata:

library(adegenet)
library(hierfstat)
#Convert DNAStringSet to Genind:
lagomito.gen<-adegenet::DNAbin2genind(ape::as.DNAbin(lagomito.aln))

#Now we need to add our population data to the GENIND object:
strata(lagomito.gen) <- popinfo[(match(indNames(lagomito.gen), popinfo$GenBank)), ]

#And setting the Population variable as the population:
setPop(lagomito.gen) <- ~Taxon/Population

#let's also conver to a GENLIGHT object:
lagomito.glt<-dartR::gi2gl(lagomito.gen)
## Starting :: 
##  Starting dartR 
##  Starting gi2gl 
## Starting gl.compliance.check 
##   Processing genlight object with SNP data
##   The slot loc.all, which stores allele name for each locus, is empty. 
## Creating a dummy variable (A/C) to insert in this slot. 
##   Checking coding of SNPs
##     SNP data scored NA, 0, 1 or 2 confirmed
##   Checking locus metrics and flags
##   Recalculating locus metrics
##   Checking for monomorphic loci
##     No monomorphic loci detected
##   Checking for loci with all missing data
##     No loci with all missing data detected
##   Checking whether individual names are unique.
##   Checking for individual metrics
##   Warning: Creating a slot for individual metrics
##   Checking for population assignments
##     Population assignments confirmed
##   Spelling of coordinates checked and changed if necessary to 
##             lat/lon
## Completed: gl.compliance.check 
## Completed: :: 
##  Completed: dartR 
##  Completed: gi2gl

Ok, now that we have these we can run our stats!

AMOVA

We can use {poppr} to run the AMOVA:

library(poppr)
## This is poppr version 2.9.6. To get started, type package?poppr
## OMP parallel support: unavailable
amova <- poppr.amova(lagomito.gen, ~Taxon/Population)
## 
##  No missing values detected.
amova
## $call
## ade4::amova(samples = xtab, distances = xdist, structures = xstruct)
## 
## $results
##                               Df    Sum Sq   Mean Sq
## Between Taxon                  2 1605.2690 802.63452
## Between samples Within Taxon   5  132.1327  26.42655
## Within samples               118 1267.4871  10.74142
## Total                        125 3004.8889  24.03911
## 
## $componentsofcovariance
##                                              Sigma          %
## Variations  Between Taxon                19.115872  61.681789
## Variations  Between samples Within Taxon  1.133823   3.658543
## Variations  Within samples               10.741416  34.659668
## Total variations                         30.991111 100.000000
## 
## $statphi
##                          Phi
## Phi-samples-total 0.65340332
## Phi-samples-Taxon 0.09547792
## Phi-Taxon-total   0.61681789

Ok, so in this case, the $statPhi outputs give us our FST, FCT, and FSC values from Table 4, along with the amount of genetic variation explained and respective p-values, so that’s good!

FST

Now, we can check out pairwise FST for the populations:

library(hierfstat)
wc(lagomito.gen)
## $FST
## [1] 0.08449906
## 
## $FIS
## [1] -0.8741791
lagoFst <- pairwise.neifst(lagomito.gen)
knitr::kable(lagoFst)
Lagothrix poeppigii_Yasuní Lagothrix poeppigii_Tiputini Lagothrix lagothricha_Amazonas Lagothrix lagothricha_Vaupés Lagothrix lugens_Guaviare Lagothrix lugens_Meta Lagothrix lugens_Caquetá Lagothrix lugens_Huila
Lagothrix poeppigii_Yasuní NA -0.0002 0.0667 0.0717 0.1378 0.1434 0.1244 0.1108
Lagothrix poeppigii_Tiputini -0.0002 NA 0.0652 0.0706 0.1359 0.1416 0.1245 0.1101
Lagothrix lagothricha_Amazonas 0.0667 0.0652 NA 0.0115 0.1067 0.1076 0.0937 0.0743
Lagothrix lagothricha_Vaupés 0.0717 0.0706 0.0115 NA 0.1096 0.1116 0.0993 0.0794
Lagothrix lugens_Guaviare 0.1378 0.1359 0.1067 0.1096 NA 0.0011 0.0154 0.0103
Lagothrix lugens_Meta 0.1434 0.1416 0.1076 0.1116 0.0011 NA 0.0199 0.0124
Lagothrix lugens_Caquetá 0.1244 0.1245 0.0937 0.0993 0.0154 0.0199 NA 0.0110
Lagothrix lugens_Huila 0.1108 0.1101 0.0743 0.0794 0.0103 0.0124 0.0110 NA

Hmmmm… unfortunately, these definitely do not match the values from the Botero et al. (2015) paper (Table 5)! Perhaps because these were calculated individually? FST for the whole sample is extraordinarily low (0.08449906) compared to that published in Botero et al. (2015), which is listed at 0.65 in Table 4 (granted, this says it’s from an AMOVA).

Here we can get p-values:

library(StAMPP)
## Loading required package: pegas
## Loading required package: ape
## 
## Attaching package: 'ape'
## The following objects are masked from 'package:hierfstat':
## 
##     pcoa, varcomp
## The following object is masked from 'package:Biostrings':
## 
##     complement
## The following object is masked from 'package:dplyr':
## 
##     where
## 
## Attaching package: 'pegas'
## The following object is masked from 'package:ape':
## 
##     mst
## The following object is masked from 'package:ade4':
## 
##     amova
stamppFst(lagomito.glt,nboots=100,percent=95,nclusters=1)
## $Fsts
##                                Lagothrix poeppigii_Yasuní
## Lagothrix poeppigii_Yasuní                             NA
## Lagothrix poeppigii_Tiputini                -0.0003500162
## Lagothrix lagothricha_Amazonas               0.1248893130
## Lagothrix lagothricha_Vaupés                 0.1305876436
## Lagothrix lugens_Guaviare                    0.2440985250
## Lagothrix lugens_Meta                        0.2579742463
## Lagothrix lugens_Caquetá                     0.2246935987
## Lagothrix lugens_Huila                       0.2061487058
##                                Lagothrix poeppigii_Tiputini
## Lagothrix poeppigii_Yasuní                               NA
## Lagothrix poeppigii_Tiputini                             NA
## Lagothrix lagothricha_Amazonas                    0.1235527
## Lagothrix lagothricha_Vaupés                      0.1280668
## Lagothrix lugens_Guaviare                         0.2438214
## Lagothrix lugens_Meta                             0.2604714
## Lagothrix lugens_Caquetá                          0.2272550
## Lagothrix lugens_Huila                            0.2067815
##                                Lagothrix lagothricha_Amazonas
## Lagothrix poeppigii_Yasuní                                 NA
## Lagothrix poeppigii_Tiputini                               NA
## Lagothrix lagothricha_Amazonas                             NA
## Lagothrix lagothricha_Vaupés                        0.0241966
## Lagothrix lugens_Guaviare                           0.2120494
## Lagothrix lugens_Meta                               0.2183099
## Lagothrix lugens_Caquetá                            0.1892413
## Lagothrix lugens_Huila                              0.1564030
##                                Lagothrix lagothricha_Vaupés
## Lagothrix poeppigii_Yasuní                               NA
## Lagothrix poeppigii_Tiputini                             NA
## Lagothrix lagothricha_Amazonas                           NA
## Lagothrix lagothricha_Vaupés                             NA
## Lagothrix lugens_Guaviare                         0.2164087
## Lagothrix lugens_Meta                             0.2272460
## Lagothrix lugens_Caquetá                          0.1992226
## Lagothrix lugens_Huila                            0.1655863
##                                Lagothrix lugens_Guaviare Lagothrix lugens_Meta
## Lagothrix poeppigii_Yasuní                            NA                    NA
## Lagothrix poeppigii_Tiputini                          NA                    NA
## Lagothrix lagothricha_Amazonas                        NA                    NA
## Lagothrix lagothricha_Vaupés                          NA                    NA
## Lagothrix lugens_Guaviare                             NA                    NA
## Lagothrix lugens_Meta                        0.002184634                    NA
## Lagothrix lugens_Caquetá                     0.036870504            0.04758936
## Lagothrix lugens_Huila                       0.024475986            0.03102157
##                                Lagothrix lugens_Caquetá Lagothrix lugens_Huila
## Lagothrix poeppigii_Yasuní                           NA                     NA
## Lagothrix poeppigii_Tiputini                         NA                     NA
## Lagothrix lagothricha_Amazonas                       NA                     NA
## Lagothrix lagothricha_Vaupés                         NA                     NA
## Lagothrix lugens_Guaviare                            NA                     NA
## Lagothrix lugens_Meta                                NA                     NA
## Lagothrix lugens_Caquetá                             NA                     NA
## Lagothrix lugens_Huila                       0.02428826                     NA
## 
## $Pvalues
##                                Lagothrix poeppigii_Yasuní
## Lagothrix poeppigii_Yasuní                             NA
## Lagothrix poeppigii_Tiputini                         0.56
## Lagothrix lagothricha_Amazonas                       0.00
## Lagothrix lagothricha_Vaupés                         0.00
## Lagothrix lugens_Guaviare                            0.00
## Lagothrix lugens_Meta                                0.00
## Lagothrix lugens_Caquetá                             0.00
## Lagothrix lugens_Huila                               0.00
##                                Lagothrix poeppigii_Tiputini
## Lagothrix poeppigii_Yasuní                               NA
## Lagothrix poeppigii_Tiputini                             NA
## Lagothrix lagothricha_Amazonas                            0
## Lagothrix lagothricha_Vaupés                              0
## Lagothrix lugens_Guaviare                                 0
## Lagothrix lugens_Meta                                     0
## Lagothrix lugens_Caquetá                                  0
## Lagothrix lugens_Huila                                    0
##                                Lagothrix lagothricha_Amazonas
## Lagothrix poeppigii_Yasuní                                 NA
## Lagothrix poeppigii_Tiputini                               NA
## Lagothrix lagothricha_Amazonas                             NA
## Lagothrix lagothricha_Vaupés                                0
## Lagothrix lugens_Guaviare                                   0
## Lagothrix lugens_Meta                                       0
## Lagothrix lugens_Caquetá                                    0
## Lagothrix lugens_Huila                                      0
##                                Lagothrix lagothricha_Vaupés
## Lagothrix poeppigii_Yasuní                               NA
## Lagothrix poeppigii_Tiputini                             NA
## Lagothrix lagothricha_Amazonas                           NA
## Lagothrix lagothricha_Vaupés                             NA
## Lagothrix lugens_Guaviare                                 0
## Lagothrix lugens_Meta                                     0
## Lagothrix lugens_Caquetá                                  0
## Lagothrix lugens_Huila                                    0
##                                Lagothrix lugens_Guaviare Lagothrix lugens_Meta
## Lagothrix poeppigii_Yasuní                            NA                    NA
## Lagothrix poeppigii_Tiputini                          NA                    NA
## Lagothrix lagothricha_Amazonas                        NA                    NA
## Lagothrix lagothricha_Vaupés                          NA                    NA
## Lagothrix lugens_Guaviare                             NA                    NA
## Lagothrix lugens_Meta                                0.1                    NA
## Lagothrix lugens_Caquetá                             0.0                     0
## Lagothrix lugens_Huila                               0.0                     0
##                                Lagothrix lugens_Caquetá Lagothrix lugens_Huila
## Lagothrix poeppigii_Yasuní                           NA                     NA
## Lagothrix poeppigii_Tiputini                         NA                     NA
## Lagothrix lagothricha_Amazonas                       NA                     NA
## Lagothrix lagothricha_Vaupés                         NA                     NA
## Lagothrix lugens_Guaviare                            NA                     NA
## Lagothrix lugens_Meta                                NA                     NA
## Lagothrix lugens_Caquetá                             NA                     NA
## Lagothrix lugens_Huila                                0                     NA
## 
## $Bootstraps
##                       Population1                    Population2            1
## 1      Lagothrix poeppigii_Yasuní   Lagothrix poeppigii_Tiputini -0.003609592
## 2      Lagothrix poeppigii_Yasuní Lagothrix lagothricha_Amazonas  0.080367392
## 3      Lagothrix poeppigii_Yasuní   Lagothrix lagothricha_Vaupés  0.085003851
## 4      Lagothrix poeppigii_Yasuní      Lagothrix lugens_Guaviare  0.180462212
## 5      Lagothrix poeppigii_Yasuní          Lagothrix lugens_Meta  0.198441642
## 6      Lagothrix poeppigii_Yasuní       Lagothrix lugens_Caquetá  0.158379915
## 7      Lagothrix poeppigii_Yasuní         Lagothrix lugens_Huila  0.151807568
## 8    Lagothrix poeppigii_Tiputini Lagothrix lagothricha_Amazonas  0.079684202
## 9    Lagothrix poeppigii_Tiputini   Lagothrix lagothricha_Vaupés  0.077673345
## 10   Lagothrix poeppigii_Tiputini      Lagothrix lugens_Guaviare  0.180721214
## 11   Lagothrix poeppigii_Tiputini          Lagothrix lugens_Meta  0.189268483
## 12   Lagothrix poeppigii_Tiputini       Lagothrix lugens_Caquetá  0.146821149
## 13   Lagothrix poeppigii_Tiputini         Lagothrix lugens_Huila  0.138268792
## 14 Lagothrix lagothricha_Amazonas   Lagothrix lagothricha_Vaupés  0.003002954
## 15 Lagothrix lagothricha_Amazonas      Lagothrix lugens_Guaviare  0.139720372
## 16 Lagothrix lagothricha_Amazonas          Lagothrix lugens_Meta  0.149824837
## 17 Lagothrix lagothricha_Amazonas       Lagothrix lugens_Caquetá  0.128708011
## 18 Lagothrix lagothricha_Amazonas         Lagothrix lugens_Huila  0.105008246
## 19   Lagothrix lagothricha_Vaupés      Lagothrix lugens_Guaviare  0.148457729
## 20   Lagothrix lagothricha_Vaupés          Lagothrix lugens_Meta  0.158854779
## 21   Lagothrix lagothricha_Vaupés       Lagothrix lugens_Caquetá  0.133054069
## 22   Lagothrix lagothricha_Vaupés         Lagothrix lugens_Huila  0.110121606
## 23      Lagothrix lugens_Guaviare          Lagothrix lugens_Meta -0.002848177
## 24      Lagothrix lugens_Guaviare       Lagothrix lugens_Caquetá  0.006656805
## 25      Lagothrix lugens_Guaviare         Lagothrix lugens_Huila  0.007086382
## 26          Lagothrix lugens_Meta       Lagothrix lugens_Caquetá  0.015022329
## 27          Lagothrix lugens_Meta         Lagothrix lugens_Huila  0.016214944
## 28       Lagothrix lugens_Caquetá         Lagothrix lugens_Huila  0.007939403
##               2            3            4            5            6
## 1  -0.003326732 -0.002766671 -0.002676902 -0.002391883 -0.002218311
## 2   0.090749998  0.093488291  0.094603710  0.094638224  0.096666475
## 3   0.088005417  0.088286020  0.089779338  0.092591674  0.092940114
## 4   0.193121887  0.193637889  0.197243002  0.200715494  0.203403493
## 5   0.204618072  0.209583193  0.213820081  0.216127943  0.221634624
## 6   0.162207356  0.169273523  0.169389567  0.175004583  0.183928870
## 7   0.160752642  0.162147074  0.166719380  0.172061939  0.172494404
## 8   0.082918357  0.083253217  0.085798960  0.085907244  0.093600943
## 9   0.082923684  0.084853443  0.086279922  0.087176017  0.089693937
## 10  0.192494109  0.194931808  0.196705422  0.197172316  0.202621217
## 11  0.202276829  0.214892378  0.214944463  0.217748499  0.221757305
## 12  0.154469914  0.165626638  0.185524056  0.187663975  0.187823567
## 13  0.154277105  0.164911302  0.169712272  0.172166410  0.174285205
## 14  0.007390374  0.009574805  0.010286700  0.011241287  0.012033769
## 15  0.157176779  0.163190663  0.163532102  0.166822436  0.167960854
## 16  0.166476646  0.169232512  0.169669661  0.174680924  0.176233194
## 17  0.132202025  0.141855560  0.148547616  0.148758660  0.151994585
## 18  0.125514555  0.126549735  0.129121846  0.131068429  0.131316662
## 19  0.152083242  0.154371889  0.154878086  0.169163597  0.177796520
## 20  0.162387254  0.169821815  0.174367119  0.175606608  0.180850372
## 21  0.140028737  0.147946966  0.150184291  0.151179455  0.154896261
## 22  0.110267477  0.118228230  0.128739164  0.133105773  0.135012148
## 23 -0.002070032 -0.001787012 -0.001568546 -0.001162317 -0.001099422
## 24  0.015881709  0.016151685  0.016917293  0.017105263  0.018392690
## 25  0.010249219  0.014699393  0.014804073  0.015977637  0.016193289
## 26  0.018483930  0.023272301  0.024448922  0.027480615  0.028130429
## 27  0.016297881  0.017260734  0.018862510  0.019401478  0.020019055
## 28  0.009355100  0.009466689  0.010238276  0.012383178  0.012514926
##               7            8             9            10           11
## 1  -0.001962713 -0.001945708 -0.0019118323 -0.0019066396 -0.001844355
## 2   0.099639661  0.099893274  0.1002843277  0.1005128129  0.101309818
## 3   0.094386247  0.097334668  0.0973395424  0.0974375639  0.099603990
## 4   0.206232117  0.207024435  0.2124553286  0.2130529618  0.213948030
## 5   0.221817079  0.224977906  0.2250038834  0.2271622587  0.227760374
## 6   0.185677859  0.187998775  0.1907920804  0.1926396606  0.195500611
## 7   0.174079248  0.177358909  0.1782019050  0.1782945563  0.178666389
## 8   0.094958876  0.096703148  0.0972362069  0.0987391949  0.099439132
## 9   0.089718288  0.093799500  0.0938532489  0.0940378574  0.094654477
## 10  0.205140271  0.205269885  0.2062572193  0.2070212493  0.208272516
## 11  0.221864346  0.222886756  0.2248143526  0.2292666438  0.231628229
## 12  0.189169170  0.190174026  0.1937206386  0.1974082027  0.197797784
## 13  0.176666866  0.176881265  0.1773776659  0.1792517187  0.180683395
## 14  0.012223948  0.013194456  0.0135537811  0.0145107166  0.015298575
## 15  0.174704186  0.176328411  0.1835444065  0.1844531846  0.185057140
## 16  0.178682556  0.179233371  0.1845248440  0.1907880604  0.191585076
## 17  0.152263805  0.152474699  0.1549705778  0.1564637907  0.157237822
## 18  0.133063087  0.133513756  0.1341643099  0.1343171787  0.136619333
## 19  0.178843247  0.178983081  0.1841484201  0.1862808732  0.188968142
## 20  0.183117273  0.187033441  0.1935304769  0.1938227517  0.197702462
## 21  0.159729055  0.160771588  0.1631312120  0.1673189621  0.169490767
## 22  0.135044807  0.140820001  0.1430175607  0.1454837137  0.145596260
## 23 -0.001013160 -0.000824853 -0.0008097426 -0.0006860291  0.000113154
## 24  0.018950437  0.019041769  0.0206378987  0.0216701903  0.022230321
## 25  0.016303397  0.016388622  0.0167044998  0.0173183336  0.017708565
## 26  0.028510490  0.029644981  0.0297509994  0.0299498435  0.030624540
## 27  0.020026046  0.020094210  0.0203971377  0.0221405494  0.022576246
## 28  0.012568464  0.013877690  0.0139055605  0.0139605141  0.014409296
##              12           13            14            15            16
## 1  -0.001838563 -0.001833733 -0.0017737534 -0.0017546051 -0.0017356036
## 2   0.102019380  0.103916809  0.1052727510  0.1067357709  0.1067975215
## 3   0.099744382  0.100152161  0.1015319599  0.1056105433  0.1085460689
## 4   0.214684573  0.216071006  0.2164873713  0.2165545837  0.2178965114
## 5   0.228703275  0.229364217  0.2331500992  0.2343523395  0.2345579822
## 6   0.200358629  0.203944085  0.2044485762  0.2070993779  0.2076309189
## 7   0.180921630  0.185435148  0.1861173250  0.1863805878  0.1871241075
## 8   0.100333914  0.100597733  0.1017980245  0.1021683874  0.1023669251
## 9   0.096236588  0.096492498  0.0966133012  0.0972839711  0.0976804093
## 10  0.212454809  0.212925218  0.2133273951  0.2138740520  0.2155943268
## 11  0.231760735  0.232615059  0.2328061295  0.2334959816  0.2353370904
## 12  0.197891024  0.198849847  0.2012051863  0.2012174757  0.2027730433
## 13  0.182454568  0.183225389  0.1834993413  0.1851697344  0.1858461810
## 14  0.015377567  0.015380760  0.0156522546  0.0160566860  0.0163549575
## 15  0.188267310  0.188427814  0.1899295959  0.1907449371  0.1924380482
## 16  0.195161267  0.195584992  0.1957361271  0.1977738613  0.1978540827
## 17  0.157936384  0.159659642  0.1601584892  0.1601898330  0.1617876858
## 18  0.137614941  0.138660142  0.1389675212  0.1401212817  0.1401297836
## 19  0.189188422  0.190314645  0.1916807695  0.1946039169  0.1948846447
## 20  0.202374478  0.204510749  0.2049308656  0.2050369588  0.2058293832
## 21  0.170854991  0.171097551  0.1714712587  0.1721127437  0.1749382374
## 22  0.146131709  0.148636658  0.1489700584  0.1502055392  0.1508515087
## 23  0.000134294  0.000149645  0.0001551528  0.0001894246  0.0002099797
## 24  0.022471910  0.022511848  0.0225752508  0.0227386935  0.0231687014
## 25  0.017849333  0.017854246  0.0181459345  0.0182338948  0.0183019614
## 26  0.030700042  0.031031934  0.0313274867  0.0315562888  0.0315683538
## 27  0.022593346  0.022603122  0.0227102645  0.0228561560  0.0234271126
## 28  0.014478657  0.014694746  0.0149329341  0.0149501102  0.0154177027
##               17            18            19            20           21
## 1  -0.0017132942 -0.0016376448 -0.0016373516 -0.0016018837 -0.001572668
## 2   0.1069681164  0.1073398576  0.1097497401  0.1102139640  0.110532894
## 3   0.1086183356  0.1092838086  0.1096792939  0.1103057638  0.110350515
## 4   0.2230435589  0.2234886263  0.2240750434  0.2272177784  0.227243871
## 5   0.2379495727  0.2381944658  0.2390749627  0.2413217019  0.241491483
## 6   0.2079585130  0.2092436367  0.2098538207  0.2100512292  0.210373516
## 7   0.1900332691  0.1902711997  0.1921116821  0.1926830707  0.192715286
## 8   0.1036563141  0.1075075587  0.1076571439  0.1084851533  0.109677122
## 9   0.0980562930  0.1009202637  0.1016061962  0.1069891930  0.110115556
## 10  0.2200143956  0.2226949194  0.2230150973  0.2263463626  0.226858263
## 11  0.2364208303  0.2374601616  0.2384837016  0.2412125589  0.241527086
## 12  0.2040696193  0.2060340027  0.2095336563  0.2097590507  0.210584869
## 13  0.1882330727  0.1896221989  0.1899412965  0.1922080484  0.192480114
## 14  0.0164281539  0.0169053198  0.0169149117  0.0173491205  0.017493441
## 15  0.1934848875  0.1935256935  0.1939153420  0.1940102447  0.194307691
## 16  0.1979752189  0.1989781098  0.1996334553  0.2002954775  0.200755229
## 17  0.1619607538  0.1625981368  0.1641209719  0.1658261451  0.167881924
## 18  0.1424279728  0.1436425055  0.1442918147  0.1446890116  0.145699236
## 19  0.1954105399  0.1955665972  0.1957218916  0.1958096756  0.198878095
## 20  0.2073909257  0.2074932506  0.2076469194  0.2079018231  0.209225629
## 21  0.1767953633  0.1772365362  0.1777806415  0.1778168923  0.180009778
## 22  0.1511387674  0.1522708889  0.1527225816  0.1530011635  0.153968519
## 23  0.0003497857  0.0003830288  0.0004603465  0.0005483921  0.000665155
## 24  0.0234138973  0.0234710300  0.0236998917  0.0237068966  0.023832685
## 25  0.0186102876  0.0186103698  0.0188300501  0.0194259140  0.019426713
## 26  0.0322432333  0.0333733449  0.0336434839  0.0337553217  0.033868734
## 27  0.0234823561  0.0236802496  0.0238589370  0.0241704128  0.024237343
## 28  0.0159099521  0.0160307791  0.0160493615  0.0164403099  0.016639661
##               22            23            24            25            26
## 1  -0.0015496508 -0.0015022956 -0.0013604659 -0.0013146285 -0.0012357374
## 2   0.1121937315  0.1122123782  0.1131456377  0.1132267702  0.1141623337
## 3   0.1108409022  0.1115347513  0.1117888009  0.1150634216  0.1168272853
## 4   0.2286045169  0.2287238792  0.2289707220  0.2293553091  0.2304062797
## 5   0.2421133234  0.2424364624  0.2430198007  0.2430210058  0.2431442040
## 6   0.2106620380  0.2115885089  0.2123293624  0.2126074886  0.2126212689
## 7   0.1944620178  0.1947227526  0.1950671541  0.1951488303  0.1957000990
## 8   0.1100064864  0.1108229517  0.1112640242  0.1119618585  0.1124048990
## 9   0.1103682571  0.1116457993  0.1138289207  0.1142886657  0.1142894207
## 10  0.2269488473  0.2272091464  0.2278849855  0.2304242404  0.2307225920
## 11  0.2426663748  0.2441844170  0.2441851864  0.2448548058  0.2449485069
## 12  0.2108573373  0.2122318002  0.2124833456  0.2134008543  0.2145253575
## 13  0.1928851508  0.1932319654  0.1946275768  0.1947759344  0.1949651476
## 14  0.0178196789  0.0178779121  0.0179403225  0.0180465467  0.0182912689
## 15  0.1943953890  0.1960363424  0.1967685626  0.1971055664  0.1977413725
## 16  0.2009282223  0.2013386007  0.2021003967  0.2029765844  0.2042617902
## 17  0.1686617381  0.1705860085  0.1739374003  0.1740442058  0.1741456239
## 18  0.1470571449  0.1473734200  0.1475471515  0.1479175006  0.1484973428
## 19  0.1998646444  0.2004607958  0.2008813315  0.2011930611  0.2014681775
## 20  0.2096079622  0.2097870043  0.2114613170  0.2116186555  0.2123540778
## 21  0.1805848423  0.1807005675  0.1809904104  0.1826023687  0.1834095371
## 22  0.1540922741  0.1543409463  0.1544038165  0.1546751844  0.1549124912
## 23  0.0006946643  0.0007224738  0.0007788215  0.0008622652  0.0008954558
## 24  0.0248216409  0.0248572788  0.0252961500  0.0254605937  0.0256607930
## 25  0.0194797821  0.0195711531  0.0198230328  0.0199935789  0.0206411812
## 26  0.0339347852  0.0344946106  0.0345191981  0.0351010501  0.0355759500
## 27  0.0244534712  0.0245562727  0.0247394122  0.0250269602  0.0255628348
## 28  0.0167246616  0.0167903413  0.0169210491  0.0170746851  0.0172136277
##               27            28           29           30           31
## 1  -0.0012165327 -0.0011293968 -0.001082876 -0.001061232 -0.001053124
## 2   0.1155756359  0.1159392554  0.116061820  0.116221935  0.116388873
## 3   0.1168370813  0.1168983914  0.117226693  0.117683496  0.120496086
## 4   0.2316531031  0.2319614074  0.232328694  0.232891571  0.233094356
## 5   0.2440270596  0.2443517480  0.244451362  0.246705243  0.247448804
## 6   0.2131947518  0.2139567905  0.214855083  0.215236123  0.215273864
## 7   0.1962874563  0.1969388811  0.197118611  0.197160965  0.197233557
## 8   0.1126216960  0.1129206765  0.113549570  0.113595371  0.114013392
## 9   0.1146056710  0.1155933598  0.116182410  0.116802732  0.119121483
## 10  0.2313017864  0.2313823028  0.231604524  0.232857804  0.232897447
## 11  0.2463963892  0.2469714016  0.248368715  0.248799232  0.250264621
## 12  0.2148364772  0.2156495284  0.215785155  0.216239384  0.217915661
## 13  0.1953394915  0.1956944717  0.196195533  0.197707995  0.198066915
## 14  0.0183468882  0.0189899055  0.019309447  0.019441114  0.019450423
## 15  0.1979453463  0.1989174973  0.200426898  0.200435636  0.201380901
## 16  0.2061225477  0.2072977451  0.207734314  0.208804928  0.208984981
## 17  0.1743756625  0.1748113816  0.174960658  0.175396032  0.176710497
## 18  0.1487215358  0.1502846187  0.150736013  0.150942636  0.151386509
## 19  0.2041595916  0.2047518881  0.205082845  0.205195629  0.205449639
## 20  0.2131600148  0.2138089260  0.214227987  0.216417234  0.216538167
## 21  0.1838804446  0.1851464777  0.187156037  0.187443181  0.188169892
## 22  0.1555525439  0.1556365603  0.155987607  0.156545508  0.156762759
## 23  0.0009382937  0.0009813598  0.001025767  0.001261155  0.001403634
## 24  0.0261457109  0.0266272189  0.026711618  0.027027027  0.027039007
## 25  0.0206461843  0.0207023945  0.020728934  0.020814883  0.020828261
## 26  0.0371042828  0.0377190882  0.037962238  0.038026660  0.038054394
## 27  0.0257748365  0.0257820883  0.025808733  0.025818286  0.025917051
## 28  0.0173087186  0.0173574871  0.017543657  0.017731823  0.017813480
##              32            33            34            35            36
## 1  -0.001031863 -0.0009713511 -0.0008131869 -0.0007955253 -0.0007859378
## 2   0.116585527  0.1166499365  0.1167629598  0.1176709641  0.1177737766
## 3   0.120843334  0.1210123533  0.1211015395  0.1227051405  0.1234469707
## 4   0.235453696  0.2370306358  0.2379416261  0.2383691317  0.2385008084
## 5   0.247801019  0.2478503685  0.2478627295  0.2486128360  0.2494766184
## 6   0.215990147  0.2167088718  0.2187528764  0.2191062354  0.2198833364
## 7   0.198557248  0.1989188334  0.1991663492  0.2006222400  0.2008494652
## 8   0.114083131  0.1143062582  0.1145576120  0.1149607931  0.1152376984
## 9   0.120867281  0.1212092679  0.1214582304  0.1227462938  0.1232396983
## 10  0.233382958  0.2338070614  0.2348145577  0.2356698068  0.2362429137
## 11  0.250564628  0.2508255417  0.2513577193  0.2516580161  0.2519139556
## 12  0.218513870  0.2186029409  0.2201894551  0.2205988994  0.2222346590
## 13  0.198220787  0.1987560230  0.1991012122  0.2023454447  0.2027401738
## 14  0.019857183  0.0202060460  0.0202843085  0.0207476767  0.0207914306
## 15  0.202399234  0.2039671618  0.2040022495  0.2048911458  0.2061389968
## 16  0.208996591  0.2099919110  0.2100833794  0.2107738059  0.2107753400
## 17  0.178296890  0.1783522557  0.1788466156  0.1798187416  0.1804452416
## 18  0.151601685  0.1517124297  0.1519765963  0.1525961870  0.1526745825
## 19  0.208088534  0.2085642474  0.2092279355  0.2097281866  0.2110650731
## 20  0.216745520  0.2171568800  0.2173184172  0.2181497153  0.2199075968
## 21  0.188617031  0.1896697708  0.1909290627  0.1912379828  0.1913445363
## 22  0.156874295  0.1595364934  0.1600035819  0.1603439178  0.1610026961
## 23  0.001416802  0.0014447654  0.0014680370  0.0015161132  0.0015279892
## 24  0.027110927  0.0271555368  0.0274849398  0.0276342975  0.0281129344
## 25  0.020850708  0.0210512346  0.0211775535  0.0214082583  0.0214464791
## 26  0.038371630  0.0385165957  0.0385802242  0.0391458483  0.0399644709
## 27  0.025998445  0.0260617104  0.0261968057  0.0263471375  0.0264394603
## 28  0.018598288  0.0187412177  0.0189797323  0.0191359576  0.0191526168
##              37           38            39            40          41
## 1  -0.000745613 -0.000616328 -0.0005434401 -0.0005406945 -0.00053555
## 2   0.118018618  0.118066731  0.1202845712  0.1203136825  0.12121218
## 3   0.124199799  0.126256735  0.1268215960  0.1268829196  0.12712465
## 4   0.239023251  0.239880293  0.2401422834  0.2405217123  0.24123653
## 5   0.250234270  0.250565889  0.2516099130  0.2527026833  0.25295735
## 6   0.220541888  0.220809305  0.2210633146  0.2213005424  0.22144286
## 7   0.200960942  0.201533724  0.2025370428  0.2029037705  0.20352434
## 8   0.115716308  0.116502351  0.1182424270  0.1192370779  0.11930996
## 9   0.123370134  0.124020544  0.1249211121  0.1250995228  0.12516604
## 10  0.237121704  0.239798405  0.2410621280  0.2412293987  0.24179939
## 11  0.253368263  0.254236842  0.2553494041  0.2568516574  0.25700949
## 12  0.222821851  0.223613098  0.2238744715  0.2247032812  0.22495744
## 13  0.202833930  0.203180842  0.2032739162  0.2048181697  0.20605280
## 14  0.021316948  0.021417366  0.0222955264  0.0225675035  0.02264011
## 15  0.206669502  0.206969144  0.2071491614  0.2082989294  0.20886478
## 16  0.211077725  0.211109736  0.2120068582  0.2120943077  0.21220890
## 17  0.181724401  0.182221671  0.1822354067  0.1824444803  0.18285286
## 18  0.152928284  0.153184387  0.1533642407  0.1536778969  0.15408790
## 19  0.212454320  0.212552746  0.2127533239  0.2130441509  0.21341949
## 20  0.220224028  0.220852992  0.2217729398  0.2225829238  0.22300693
## 21  0.191837320  0.194043434  0.1942394325  0.1972651738  0.19776139
## 22  0.161649772  0.162381163  0.1630336666  0.1633250672  0.16349484
## 23  0.001547814  0.001655516  0.0016592644  0.0016880926  0.00170329
## 24  0.028465347  0.028794403  0.0295667447  0.0304226069  0.03055274
## 25  0.021483378  0.021636441  0.0217220251  0.0218043344  0.02200425
## 26  0.040271756  0.040715467  0.0408866737  0.0410916454  0.04146948
## 27  0.026571765  0.026596089  0.0266175355  0.0266444106  0.02726956
## 28  0.019453537  0.019563550  0.0196166826  0.0196504633  0.01975823
##               42            43            44           45            46
## 1  -0.0005245339 -0.0005029734 -0.0005013307 -0.000472691 -0.0004468754
## 2   0.1215847772  0.1222525456  0.1225853987  0.122817734  0.1231665217
## 3   0.1275844829  0.1282573723  0.1283231487  0.128538220  0.1291939632
## 4   0.2424809045  0.2426120031  0.2428826614  0.244142841  0.2447876799
## 5   0.2529904131  0.2538243905  0.2539376158  0.256341865  0.2564484827
## 6   0.2222144711  0.2224421697  0.2228665834  0.224307324  0.2245081361
## 7   0.2035502505  0.2037732123  0.2050778713  0.205341294  0.2054437382
## 8   0.1195450331  0.1198469670  0.1199589627  0.120447349  0.1208443790
## 9   0.1273718108  0.1274250622  0.1275913305  0.127779187  0.1283672939
## 10  0.2419129481  0.2432511795  0.2444704786  0.244782331  0.2470693525
## 11  0.2572992701  0.2575195110  0.2586805556  0.259143049  0.2594119186
## 12  0.2251845635  0.2253390610  0.2270842696  0.227378666  0.2280294054
## 13  0.2065588165  0.2068221865  0.2069396142  0.207278277  0.2073802569
## 14  0.0227095832  0.0228200787  0.0231027919  0.023324096  0.0234371813
## 15  0.2094543391  0.2096867660  0.2116281286  0.212388064  0.2126330232
## 16  0.2134836720  0.2142606104  0.2145202416  0.215397776  0.2166037046
## 17  0.1843444513  0.1856678046  0.1890305299  0.189355643  0.1912283695
## 18  0.1542009582  0.1544589854  0.1551347303  0.155489722  0.1555062282
## 19  0.2134943834  0.2141415591  0.2143706589  0.216315680  0.2164356671
## 20  0.2238972319  0.2254990535  0.2269486069  0.228169100  0.2281786940
## 21  0.1985647828  0.1990928958  0.1998496753  0.199965288  0.2027911628
## 22  0.1635512190  0.1645637945  0.1650750173  0.165207679  0.1654180576
## 23  0.0018089191  0.0018405370  0.0018469026  0.001895702  0.0019368117
## 24  0.0310430464  0.0311784897  0.0324675325  0.032740993  0.0332872928
## 25  0.0224882400  0.0225971613  0.0227562805  0.022793211  0.0228942755
## 26  0.0419862856  0.0423092646  0.0425647829  0.042965002  0.0431754056
## 27  0.0275414583  0.0280219146  0.0283478468  0.029059339  0.0291501057
## 28  0.0199761873  0.0199909065  0.0201700711  0.020690042  0.0211902115
##               47            48            49            50            51
## 1  -0.0004199113 -0.0003583603 -0.0003117504 -0.0002304861 -0.0002254126
## 2   0.1233540630  0.1236926164  0.1242375399  0.1264788249  0.1265777546
## 3   0.1320313353  0.1328399815  0.1334686813  0.1338584891  0.1341929861
## 4   0.2448534006  0.2450479611  0.2456385664  0.2459408711  0.2469265060
## 5   0.2569996511  0.2571452419  0.2578656102  0.2594842123  0.2596706867
## 6   0.2265466073  0.2270917466  0.2276056873  0.2290686424  0.2290740942
## 7   0.2058988749  0.2063254070  0.2067676873  0.2068765616  0.2069785190
## 8   0.1218860067  0.1220110816  0.1226670986  0.1227093432  0.1246683875
## 9   0.1285067395  0.1291978248  0.1293152165  0.1294952796  0.1296555727
## 10  0.2470710739  0.2475994027  0.2479278352  0.2482704537  0.2484564298
## 11  0.2597638657  0.2607840050  0.2609133022  0.2614461838  0.2617694805
## 12  0.2286964026  0.2290871577  0.2297193552  0.2297647093  0.2309024509
## 13  0.2080086553  0.2085348863  0.2086339855  0.2086932089  0.2106214737
## 14  0.0238270232  0.0240500593  0.0243067902  0.0243855428  0.0244466851
## 15  0.2134729348  0.2135423701  0.2145062355  0.2166047850  0.2178257468
## 16  0.2177697665  0.2178177163  0.2179916089  0.2180209487  0.2211580963
## 17  0.1920554351  0.1929341710  0.1930979482  0.1935839377  0.1936114926
## 18  0.1555650265  0.1565803295  0.1577755556  0.1580786367  0.1590448542
## 19  0.2175042836  0.2178329376  0.2188519905  0.2189061490  0.2193642322
## 20  0.2281901306  0.2284882807  0.2285320242  0.2292266046  0.2294308543
## 21  0.2031325252  0.2034896971  0.2038524086  0.2038998735  0.2041789740
## 22  0.1664081923  0.1672427508  0.1672580410  0.1677000486  0.1679373900
## 23  0.0020502254  0.0020976850  0.0021453601  0.0023113858  0.0024031702
## 24  0.0334119497  0.0338312830  0.0339285714  0.0343750000  0.0347150259
## 25  0.0229670423  0.0230989892  0.0236051653  0.0236228219  0.0237273783
## 26  0.0442018537  0.0445686892  0.0447321303  0.0455062855  0.0457142709
## 27  0.0293341774  0.0293951953  0.0295147321  0.0296416963  0.0296738045
## 28  0.0213956571  0.0214657678  0.0215329521  0.0216695423  0.0217393674
##               52            53            54            55            56
## 1  -0.0001823136 -0.0001467585 -0.0001042552 -9.195166e-05 -4.363664e-05
## 2   0.1272233079  0.1273693797  0.1280841292  1.294849e-01  1.296393e-01
## 3   0.1343864186  0.1360623207  0.1369969496  1.371833e-01  1.373401e-01
## 4   0.2485920765  0.2492461400  0.2506880097  2.508107e-01  2.516887e-01
## 5   0.2598306007  0.2605036730  0.2628825749  2.631901e-01  2.633270e-01
## 6   0.2297527169  0.2303029841  0.2307779613  2.308794e-01  2.314217e-01
## 7   0.2073461696  0.2092806650  0.2093483448  2.096807e-01  2.103132e-01
## 8   0.1252423061  0.1253555355  0.1255401607  1.264665e-01  1.267021e-01
## 9   0.1303545184  0.1323476028  0.1325500043  1.325709e-01  1.327878e-01
## 10  0.2489273023  0.2500421088  0.2501944663  2.514938e-01  2.518147e-01
## 11  0.2618499649  0.2621440967  0.2626971398  2.629289e-01  2.634422e-01
## 12  0.2345079322  0.2348702148  0.2355207490  2.358794e-01  2.370467e-01
## 13  0.2111681014  0.2114606465  0.2126170078  2.127563e-01  2.129112e-01
## 14  0.0246758359  0.0252160904  0.0257416234  2.577012e-02  2.582907e-02
## 15  0.2183146639  0.2193648706  0.2194384853  2.198063e-01  2.200092e-01
## 16  0.2220615546  0.2234259216  0.2235558719  2.256102e-01  2.256555e-01
## 17  0.1947535176  0.1950344159  0.1955696462  1.976013e-01  1.981811e-01
## 18  0.1591949649  0.1594241127  0.1599323603  1.612674e-01  1.622747e-01
## 19  0.2198089168  0.2198439659  0.2206515107  2.214940e-01  2.216655e-01
## 20  0.2294703110  0.2305498184  0.2307688654  2.309893e-01  2.312245e-01
## 21  0.2048638859  0.2065250569  0.2069456006  2.070121e-01  2.071205e-01
## 22  0.1684330476  0.1692034205  0.1696321270  1.700429e-01  1.705834e-01
## 23  0.0024280626  0.0024382608  0.0024699865  2.496037e-03  2.496715e-03
## 24  0.0347402597  0.0348621421  0.0353174603  3.541196e-02  3.589965e-02
## 25  0.0239716932  0.0240153629  0.0242714638  2.440564e-02  2.452442e-02
## 26  0.0457699515  0.0461965966  0.0463121752  4.635611e-02  4.697041e-02
## 27  0.0305431388  0.0306345444  0.0308661096  3.117635e-02  3.119240e-02
## 28  0.0219700382  0.0222023674  0.0223859188  2.258114e-02  2.310184e-02
##              57           58           59           60           61
## 1  4.404509e-05 0.0001230473 0.0001744123 0.0002550101 0.0002894865
## 2  1.302017e-01 0.1308221847 0.1308349035 0.1313742099 0.1315400972
## 3  1.379657e-01 0.1381704890 0.1385101827 0.1402470050 0.1407879994
## 4  2.518867e-01 0.2521405965 0.2530777870 0.2544066370 0.2549825166
## 5  2.633395e-01 0.2635985223 0.2644342611 0.2648464670 0.2691927897
## 6  2.319249e-01 0.2335373147 0.2356991731 0.2358815558 0.2362114088
## 7  2.123206e-01 0.2124569474 0.2128173646 0.2141854547 0.2162148201
## 8  1.274728e-01 0.1277547913 0.1284571058 0.1284739460 0.1285368148
## 9  1.358568e-01 0.1364122298 0.1366834293 0.1368017914 0.1373129262
## 10 2.519377e-01 0.2529629944 0.2538644913 0.2539206016 0.2541683368
## 11 2.639107e-01 0.2642748313 0.2656724037 0.2674053852 0.2696965479
## 12 2.371392e-01 0.2384907935 0.2389486324 0.2390978715 0.2399409836
## 13 2.134019e-01 0.2141852684 0.2144687190 0.2161396349 0.2162393248
## 14 2.605739e-02 0.0261750920 0.0267249116 0.0268827570 0.0271790210
## 15 2.208448e-01 0.2210770080 0.2211803483 0.2220133660 0.2220780187
## 16 2.261710e-01 0.2263101212 0.2263234996 0.2266579608 0.2284753770
## 17 1.983786e-01 0.1985691027 0.2006023729 0.2014742002 0.2023730290
## 18 1.626836e-01 0.1635766587 0.1639468478 0.1646132334 0.1650921887
## 19 2.225859e-01 0.2226116755 0.2237702613 0.2250732319 0.2264106992
## 20 2.314983e-01 0.2328605183 0.2342187196 0.2343655646 0.2356018057
## 21 2.077730e-01 0.2080828939 0.2083039032 0.2099665737 0.2099762069
## 22 1.712651e-01 0.1713858552 0.1721374077 0.1734706130 0.1737559087
## 23 2.497082e-03 0.0025340844 0.0026129068 0.0026498812 0.0026513837
## 24 3.605769e-02 0.0363149847 0.0366766467 0.0370475113 0.0371300211
## 25 2.475309e-02 0.0249526985 0.0250964180 0.0252168018 0.0255474277
## 26 4.717723e-02 0.0473637315 0.0479951594 0.0481486096 0.0485223629
## 27 3.134795e-02 0.0316469956 0.0318626578 0.0321517461 0.0321882391
## 28 2.322376e-02 0.0233254756 0.0234892005 0.0235482125 0.0235588867
##              62           63           64           65           66
## 1  0.0003115171 0.0003203383 0.0004197824 0.0004220233 0.0004351626
## 2  0.1316812026 0.1326315153 0.1328124227 0.1329850440 0.1335418785
## 3  0.1411920839 0.1414552025 0.1414696638 0.1421177829 0.1432493112
## 4  0.2588756943 0.2594013997 0.2598274545 0.2598383910 0.2608992830
## 5  0.2697996081 0.2715095715 0.2718395711 0.2721532736 0.2726546397
## 6  0.2383500479 0.2386734460 0.2392002840 0.2407429392 0.2414540060
## 7  0.2171459087 0.2172227009 0.2184000929 0.2184897985 0.2188260084
## 8  0.1298523694 0.1304300105 0.1308555838 0.1318557427 0.1326318829
## 9  0.1375960740 0.1383224924 0.1385935983 0.1387336882 0.1388266500
## 10 0.2546941202 0.2560910831 0.2562420784 0.2579227397 0.2587642346
## 11 0.2712910202 0.2719137780 0.2725336034 0.2727808865 0.2729346043
## 12 0.2399849070 0.2413573471 0.2422735738 0.2436324809 0.2441415871
## 13 0.2165294984 0.2167858107 0.2178432560 0.2179095531 0.2191146808
## 14 0.0278200435 0.0281963983 0.0283997061 0.0286845097 0.0290131029
## 15 0.2237939006 0.2259835033 0.2265449808 0.2268083316 0.2290428520
## 16 0.2289700829 0.2306086008 0.2327148626 0.2327405752 0.2329411722
## 17 0.2024816592 0.2025013522 0.2027500439 0.2031204127 0.2038759958
## 18 0.1667499705 0.1670083873 0.1679685552 0.1683065905 0.1693171281
## 19 0.2270514685 0.2271669873 0.2273071008 0.2275538517 0.2292544126
## 20 0.2364910969 0.2368095534 0.2374574213 0.2386475152 0.2399627969
## 21 0.2100771551 0.2112428707 0.2118724882 0.2119550442 0.2123028752
## 22 0.1743821413 0.1744455246 0.1749489899 0.1756500525 0.1761674598
## 23 0.0026611046 0.0027406681 0.0028034743 0.0028044012 0.0028071398
## 24 0.0374898949 0.0376106195 0.0382775120 0.0400287632 0.0405894519
## 25 0.0255635813 0.0257598951 0.0261669525 0.0261783991 0.0270596551
## 26 0.0488607156 0.0489758809 0.0490868640 0.0493154338 0.0496201786
## 27 0.0325880034 0.0326854101 0.0330883181 0.0337551606 0.0341270512
## 28 0.0243974897 0.0246857377 0.0250727229 0.0251972409 0.0253317565
##              67           68           69           70           71
## 1  0.0004474209 0.0004516389 0.0004549106 0.0005527411 0.0005573125
## 2  0.1336361397 0.1336937853 0.1339785306 0.1347883161 0.1349507521
## 3  0.1436079985 0.1439874657 0.1450388119 0.1451832343 0.1456733096
## 4  0.2610009068 0.2610583569 0.2619655508 0.2629822179 0.2633383240
## 5  0.2733632514 0.2737243588 0.2740879821 0.2744892850 0.2764980427
## 6  0.2424108406 0.2427328031 0.2427554148 0.2433858653 0.2443595620
## 7  0.2200132296 0.2205476402 0.2211273962 0.2211714436 0.2224520172
## 8  0.1334065653 0.1342119554 0.1345426438 0.1346236520 0.1356573673
## 9  0.1392323781 0.1395293634 0.1395584870 0.1400755103 0.1436700448
## 10 0.2588020818 0.2617880652 0.2619761004 0.2629263521 0.2637501749
## 11 0.2739333108 0.2752449809 0.2758612253 0.2761802915 0.2762373337
## 12 0.2448339806 0.2461914360 0.2471558298 0.2478221650 0.2482952246
## 13 0.2208701313 0.2214124818 0.2218143852 0.2219277678 0.2231573002
## 14 0.0290497231 0.0290499208 0.0290601225 0.0290931264 0.0298257958
## 15 0.2292486206 0.2297974124 0.2310003098 0.2317138950 0.2324109648
## 16 0.2349952845 0.2353952911 0.2358078709 0.2373634727 0.2375933053
## 17 0.2048703345 0.2050035597 0.2053664503 0.2064486282 0.2075902776
## 18 0.1695246348 0.1696701190 0.1699297718 0.1700066744 0.1705384864
## 19 0.2326959896 0.2334866770 0.2343038542 0.2344491730 0.2344508369
## 20 0.2405747861 0.2407656562 0.2435483691 0.2447105165 0.2448813905
## 21 0.2124504945 0.2128829654 0.2153878470 0.2173918277 0.2174982811
## 22 0.1765644867 0.1777376109 0.1780649256 0.1782179574 0.1804690677
## 23 0.0029248806 0.0031416920 0.0031421412 0.0032165561 0.0032867587
## 24 0.0411490683 0.0411585366 0.0413701068 0.0414969450 0.0416178195
## 25 0.0272604409 0.0273592013 0.0275752202 0.0277218394 0.0278105035
## 26 0.0498229317 0.0505399980 0.0509763230 0.0519847160 0.0523691559
## 27 0.0341486190 0.0342324711 0.0344796139 0.0346398147 0.0352074668
## 28 0.0254646133 0.0258012690 0.0259987159 0.0260246557 0.0264526366
##              72           73           74           75           76
## 1  0.0006201751 0.0006494242 0.0006957058 0.0007025021 0.0007079824
## 2  0.1353114985 0.1355202585 0.1358706229 0.1377369227 0.1387883679
## 3  0.1459895017 0.1470077380 0.1472323660 0.1474014621 0.1483137865
## 4  0.2653566714 0.2655777704 0.2657175474 0.2660147027 0.2660727749
## 5  0.2770305437 0.2773875233 0.2796576511 0.2797341397 0.2797974624
## 6  0.2453238664 0.2455188341 0.2485049641 0.2486911764 0.2491384310
## 7  0.2230192155 0.2245851126 0.2250769114 0.2255111248 0.2266987966
## 8  0.1370438186 0.1375813813 0.1382045427 0.1385319458 0.1393817171
## 9  0.1437698078 0.1442300874 0.1459124623 0.1475346732 0.1477363549
## 10 0.2645390581 0.2646896405 0.2652525883 0.2662806017 0.2664148679
## 11 0.2775187597 0.2777638427 0.2789017115 0.2800014770 0.2810081685
## 12 0.2485873688 0.2496590314 0.2504016880 0.2507590855 0.2508240107
## 13 0.2241704457 0.2243239573 0.2248604060 0.2263942516 0.2272831161
## 14 0.0299677727 0.0299915151 0.0304142100 0.0307002231 0.0308786619
## 15 0.2329611526 0.2330762263 0.2330977336 0.2337706254 0.2339411548
## 16 0.2388631245 0.2388965706 0.2414471838 0.2420516727 0.2424266009
## 17 0.2078554173 0.2082077124 0.2086306756 0.2091630251 0.2097090844
## 18 0.1733421224 0.1737522731 0.1738201840 0.1744581304 0.1753279205
## 19 0.2347843212 0.2360284965 0.2367028451 0.2377519216 0.2378257835
## 20 0.2449149937 0.2451913261 0.2453008381 0.2457408442 0.2469776038
## 21 0.2192603083 0.2200575973 0.2201351223 0.2211520151 0.2222059533
## 22 0.1811252491 0.1813632402 0.1831227041 0.1842491279 0.1844610752
## 23 0.0033156317 0.0033506672 0.0034258985 0.0034595358 0.0035015909
## 24 0.0419407895 0.0421087533 0.0422396857 0.0423901941 0.0424454829
## 25 0.0281335386 0.0282435247 0.0289677342 0.0291906676 0.0293164536
## 26 0.0525086607 0.0538590387 0.0538742997 0.0543402524 0.0543442646
## 27 0.0352445688 0.0359377868 0.0360937090 0.0362680342 0.0363829927
## 28 0.0266093883 0.0268473416 0.0274049148 0.0277148244 0.0280867298
##              77           78           79           80           81
## 1  0.0007203513 0.0007210355 0.0008056247 0.0008225731 0.0008251189
## 2  0.1408516125 0.1410825825 0.1412770495 0.1428820660 0.1431613420
## 3  0.1487099819 0.1487230350 0.1517285602 0.1531308978 0.1543506023
## 4  0.2691496598 0.2705984987 0.2712372819 0.2715234823 0.2721055457
## 5  0.2806856712 0.2810012580 0.2830181879 0.2830245857 0.2846640074
## 6  0.2491440225 0.2497336206 0.2504684038 0.2513660891 0.2536246269
## 7  0.2270884561 0.2274023634 0.2315366492 0.2318938955 0.2320016964
## 8  0.1398923426 0.1401099022 0.1412012274 0.1416437536 0.1425123339
## 9  0.1486843645 0.1507195000 0.1511842036 0.1515196810 0.1518515931
## 10 0.2668665597 0.2670179368 0.2675355696 0.2691940197 0.2704205342
## 11 0.2824442435 0.2831209471 0.2846617280 0.2853814236 0.2862197547
## 12 0.2508375707 0.2520481754 0.2524679445 0.2542279902 0.2552448016
## 13 0.2275859992 0.2277921895 0.2306505113 0.2307638399 0.2323359620
## 14 0.0310926275 0.0315715611 0.0319786153 0.0323207857 0.0326634506
## 15 0.2341302441 0.2351581985 0.2356656449 0.2358808465 0.2376119095
## 16 0.2426210812 0.2437105383 0.2438943645 0.2446732641 0.2460067923
## 17 0.2137101747 0.2146432230 0.2148140207 0.2159511468 0.2167145448
## 18 0.1784290283 0.1806194061 0.1807325471 0.1808089621 0.1810781946
## 19 0.2379907752 0.2396404175 0.2405381178 0.2411151954 0.2420148704
## 20 0.2482094083 0.2488866800 0.2501876239 0.2540552443 0.2543927557
## 21 0.2222870185 0.2224470544 0.2251479116 0.2266965450 0.2270654573
## 22 0.1845930900 0.1855622668 0.1868648669 0.1876214353 0.1878827472
## 23 0.0036030235 0.0036662133 0.0036736346 0.0037359744 0.0038276201
## 24 0.0428530752 0.0428822938 0.0441489362 0.0442355117 0.0443262411
## 25 0.0298356191 0.0298581685 0.0300888187 0.0301174880 0.0301479541
## 26 0.0547202004 0.0550382459 0.0551753258 0.0553858749 0.0559233709
## 27 0.0364534806 0.0364736680 0.0367802875 0.0370696183 0.0375179934
## 28 0.0281253144 0.0283498574 0.0284004283 0.0288341530 0.0288964304
##              82           83          84          85          86          87
## 1  0.0008571362 0.0008602327 0.001072137 0.001107607 0.001174506 0.001258104
## 2  0.1434192315 0.1439418376 0.144082456 0.145737795 0.146418334 0.146541987
## 3  0.1546869313 0.1547848467 0.155310524 0.156036184 0.158485661 0.158907966
## 4  0.2733778611 0.2740562537 0.275107461 0.275302460 0.275927623 0.276476923
## 5  0.2847912848 0.2850910566 0.289662472 0.290120670 0.290374904 0.290623984
## 6  0.2539261542 0.2545246373 0.254597145 0.254815405 0.254845976 0.256256993
## 7  0.2324743707 0.2325756126 0.234089505 0.235287750 0.237187241 0.237985339
## 8  0.1435303293 0.1439630075 0.144391383 0.144894513 0.144998267 0.146865716
## 9  0.1539515336 0.1550843690 0.155520360 0.157824254 0.157973088 0.158403823
## 10 0.2716145501 0.2762669910 0.276366153 0.276539532 0.277213507 0.279071810
## 11 0.2915673630 0.2920554336 0.293045284 0.294147905 0.294190189 0.296349243
## 12 0.2559988333 0.2564180985 0.257782108 0.261749212 0.262069505 0.262270732
## 13 0.2339230077 0.2343462809 0.236118924 0.237446214 0.239179228 0.240710835
## 14 0.0326824254 0.0330978857 0.033334193 0.033341261 0.033636674 0.033646003
## 15 0.2401901745 0.2405741347 0.241164273 0.242718268 0.243546312 0.246454295
## 16 0.2461014933 0.2496317277 0.249831907 0.252079499 0.255159956 0.255602868
## 17 0.2174122759 0.2192650375 0.219657512 0.224122428 0.224843250 0.225287815
## 18 0.1815951221 0.1821711090 0.182442334 0.182987721 0.183017422 0.184014819
## 19 0.2430524216 0.2433536453 0.245461494 0.246917694 0.247257796 0.252607305
## 20 0.2555866394 0.2596620677 0.264163991 0.266493113 0.267672695 0.268324809
## 21 0.2270809988 0.2277720196 0.228132578 0.230685791 0.232695161 0.233264225
## 22 0.1888471888 0.1903788922 0.191333386 0.191571751 0.195499708 0.197379310
## 23 0.0040209689 0.0040402410 0.004171809 0.004221507 0.004458304 0.004599747
## 24 0.0454927212 0.0459895379 0.046316478 0.047222222 0.047500000 0.047776727
## 25 0.0304096394 0.0304319157 0.030606162 0.031263965 0.031461905 0.031498714
## 26 0.0559986994 0.0563241753 0.057855501 0.058024510 0.058477185 0.058537758
## 27 0.0375262579 0.0377100104 0.037934422 0.037964872 0.038488593 0.038500932
## 28 0.0290622002 0.0291880332 0.029337493 0.030454316 0.030575555 0.030750810
##             88          89          90          91          92          93
## 1  0.001288775 0.001363085 0.001441326 0.001480019 0.001493055 0.001587967
## 2  0.146855097 0.147000320 0.148406117 0.149253961 0.149414213 0.153505078
## 3  0.159059206 0.162952938 0.163763576 0.164178928 0.164538883 0.168131960
## 4  0.277618564 0.278769833 0.279701884 0.280116179 0.282702182 0.284563396
## 5  0.291993587 0.295047490 0.301115972 0.301194218 0.301247052 0.302418182
## 6  0.257069135 0.257724830 0.260816291 0.262942563 0.264347096 0.264349250
## 7  0.240142069 0.245098584 0.245646688 0.245725513 0.247026310 0.247994181
## 8  0.149116139 0.151412335 0.151429244 0.151480950 0.152561272 0.159099699
## 9  0.159945714 0.161537770 0.162240095 0.163741880 0.163913251 0.165577559
## 10 0.282628160 0.283098135 0.284097129 0.284427333 0.285184776 0.286110311
## 11 0.297934466 0.300273140 0.300377632 0.300552988 0.304612826 0.306905031
## 12 0.262694842 0.264984711 0.266400682 0.266443625 0.267648885 0.268328697
## 13 0.240978428 0.241227836 0.242368336 0.243918357 0.248130705 0.254186597
## 14 0.034265185 0.034710205 0.034787924 0.035137028 0.035300295 0.035520489
## 15 0.247314481 0.249947019 0.250152560 0.250550217 0.250654762 0.253855004
## 16 0.255750089 0.256822373 0.257093908 0.258011477 0.258114473 0.259093837
## 17 0.226946760 0.229846333 0.231228025 0.231429996 0.234562060 0.234639391
## 18 0.185556416 0.186167240 0.187307600 0.187471655 0.189386848 0.190702818
## 19 0.255828542 0.258178413 0.260173928 0.261670125 0.262248928 0.264137825
## 20 0.268599239 0.270758813 0.271584303 0.274019412 0.274596832 0.276684405
## 21 0.234005312 0.236151267 0.238020551 0.238344091 0.238345252 0.242912165
## 22 0.197587227 0.198009784 0.198283953 0.200839167 0.204606955 0.205628017
## 23 0.004744202 0.004914618 0.005010964 0.005371275 0.005485227 0.005741794
## 24 0.048165138 0.048373288 0.048442450 0.049358342 0.053142329 0.054058057
## 25 0.031714994 0.032541524 0.033411758 0.033907453 0.034040964 0.034334097
## 26 0.060152531 0.061413808 0.063772508 0.064263415 0.064811446 0.066178722
## 27 0.038715514 0.038752422 0.039484143 0.039868214 0.040116855 0.041139626
## 28 0.031404493 0.032483149 0.033361756 0.034463223 0.034952104 0.035500065
##             94          95          96          97          98          99
## 1  0.001747961 0.001806241 0.001903200 0.002205528 0.002309417 0.003336304
## 2  0.155043449 0.156120175 0.156461494 0.162866622 0.163340930 0.169014867
## 3  0.168208910 0.168572031 0.169588109 0.169948842 0.171464686 0.182460583
## 4  0.285921791 0.291970951 0.292525857 0.299069684 0.301302864 0.314196009
## 5  0.302795996 0.302831920 0.305931872 0.311472176 0.313890285 0.315543095
## 6  0.264601829 0.265563318 0.269199177 0.272697791 0.280855600 0.283803736
## 7  0.248121758 0.251148973 0.252828783 0.255132979 0.256272634 0.271717903
## 8  0.159343392 0.160956799 0.162039574 0.163616292 0.163720798 0.166909170
## 9  0.166245314 0.166826843 0.167239251 0.169533171 0.172899105 0.175114096
## 10 0.288830995 0.291913750 0.292183355 0.295441779 0.304104473 0.304372745
## 11 0.308201276 0.312569677 0.313325275 0.316092883 0.324446680 0.324849317
## 12 0.270429358 0.273012204 0.279403109 0.283664732 0.284530976 0.285773512
## 13 0.254459555 0.254581400 0.256957072 0.260454798 0.260974421 0.262847679
## 14 0.036086960 0.037030851 0.040053334 0.041219050 0.042885419 0.045066820
## 15 0.254734569 0.255704230 0.255743841 0.258007582 0.284748811 0.284861537
## 16 0.259990102 0.260714040 0.263841539 0.263907172 0.275966626 0.282017986
## 17 0.235973020 0.239283260 0.240003247 0.240587994 0.249360011 0.254210195
## 18 0.190930988 0.191393323 0.191801519 0.192261948 0.196461319 0.209670173
## 19 0.264991464 0.266405344 0.272213957 0.272361405 0.279725919 0.288713880
## 20 0.277316444 0.281350346 0.285362479 0.288098854 0.288571827 0.290739754
## 21 0.245704566 0.250493136 0.252410713 0.253212400 0.256922400 0.263520925
## 22 0.207301896 0.207484076 0.209370825 0.212291388 0.219902838 0.234597533
## 23 0.005746730 0.006245913 0.006435485 0.006485075 0.006801284 0.007121202
## 24 0.054932735 0.057235421 0.063099042 0.064241486 0.067796610 0.071320869
## 25 0.034821720 0.035049111 0.035761658 0.037502551 0.039284920 0.042434997
## 26 0.071681814 0.072157143 0.072977840 0.075795992 0.077750082 0.080190983
## 27 0.041457489 0.044193149 0.045331561 0.046689161 0.048109384 0.049323554
## 28 0.035803376 0.036029523 0.036135039 0.037644289 0.041267418 0.043741450
##            100 Lower bound CI limit Upper bound CI limit p-value           Fst
## 1  0.003584525         -0.002766671          0.002205528    0.56 -0.0003500162
## 2  0.189545874          0.093488291          0.162866622    0.00  0.1248893130
## 3  0.228206181          0.088286020          0.169948842    0.00  0.1305876436
## 4  0.315108415          0.193637889          0.299069684    0.00  0.2440985250
## 5  0.317878584          0.209583193          0.311472176    0.00  0.2579742463
## 6  0.301704471          0.169273523          0.272697791    0.00  0.2246935987
## 7  0.274397312          0.162147074          0.255132979    0.00  0.2061487058
## 8  0.186028002          0.083253217          0.163616292    0.00  0.1235526996
## 9  0.226555416          0.084853443          0.169533171    0.00  0.1280668143
## 10 0.321274103          0.194931808          0.295441779    0.00  0.2438213644
## 11 0.330676713          0.214892378          0.316092883    0.00  0.2604713805
## 12 0.310471059          0.165626638          0.283664732    0.00  0.2272549522
## 13 0.280253262          0.164911302          0.260454798    0.00  0.2067814760
## 14 0.045494502          0.009574805          0.041219050    0.00  0.0241965953
## 15 0.297066655          0.163190663          0.258007582    0.00  0.2120493732
## 16 0.316701293          0.169232512          0.263907172    0.00  0.2183098753
## 17 0.256975761          0.141855560          0.240587994    0.00  0.1892413040
## 18 0.215233202          0.126549735          0.192261948    0.00  0.1564030063
## 19 0.303004298          0.154371889          0.272361405    0.00  0.2164087149
## 20 0.339696256          0.169821815          0.288098854    0.00  0.2272459657
## 21 0.271803667          0.147946966          0.253212400    0.00  0.1992226213
## 22 0.253086749          0.118228230          0.212291388    0.00  0.1655863381
## 23 0.007883953         -0.001787012          0.006485075    0.10  0.0021846340
## 24 0.083086053          0.016151685          0.064241486    0.00  0.0368705036
## 25 0.044740377          0.014699393          0.037502551    0.00  0.0244759863
## 26 0.092994057          0.023272301          0.075795992    0.00  0.0475893642
## 27 0.051094387          0.017260734          0.046689161    0.00  0.0310215687
## 28 0.051405709          0.009466689          0.037644289    0.00  0.0242882575

Ok… these FST values are higher (still not as high as Botero et al. report), and the significance values also don’t quite match. Without knowing what form of FST they used or what program they used to calculate it, I’m not sure how to address this, at the moment…

DAPC for fun!

Just for fun - let’s do a DAPC:

dapc <- dapc(lagomito.gen, n.pca = 2, n.da = 2)

scatter(dapc, cex = 2, legend = TRUE, clabel = F, posi.leg = "topleft", scree.pca = FALSE,
        posi.pca = "topright", cleg = 0.75, col=c("red3","purple","yellow","orange","purple4","darkblue","skyblue","limegreen"))

Bringing Lagothrix lagothricha tschudii into the mix!

Now, let’s look at another region of the mitogenome, COX2, to look at how the Peruvian lowland woolly monkey fits into this… in this case we’re replicating an analysis from Ruiz-Garcia et al. (2019).

Again, let’s import our data, downloaded from GenBank:

library(Biostrings)
lagomito3<-readDNAStringSet("~/Desktop/woolly_genomics/mitogenomes/Lagothrix_mitogenomes/RuizGarcia_COX2a.fasta")
lagomito4<-readDNAStringSet("~/Desktop/woolly_genomics/mitogenomes/Lagothrix_mitogenomes/RuizGarcia_COX2b.fasta")

We should also bring in some of the outgroups they used… unfortunately they didn’t actually report the accession numbers of their outgroups, so we’ll make do with an attempted replication with what COX2 sequences we could glean (keep in mind that these may not align well, and so may require trimming that leads to different results from the original paper; this is why authors should specify the GenBank accession numbers of their outgroups!):

brachyteles<-readDNAStringSet("~/Desktop/woolly_genomics/mitogenomes/Lagothrix_mitogenomes/Outgroups/Brachyteles_COII.fasta")
alouatta<-readDNAStringSet("~/Desktop/woolly_genomics/mitogenomes/Lagothrix_mitogenomes/Outgroups/Alouatta_COII.fasta")
aotus<-readDNAStringSet("~/Desktop/woolly_genomics/mitogenomes/Lagothrix_mitogenomes/Outgroups/Aotus_COII.fasta")
ateles<-readDNAStringSet("~/Desktop/woolly_genomics/mitogenomes/Lagothrix_mitogenomes/Outgroups/Ateles_COII.fasta")

Let’s now run our alignment, effectively merging our two sequencing files (we’ll also first orient our sequences, to make sure they’re all running in the same direction!):

library(DECIPHER)
outgroup<-c(brachyteles,aotus,alouatta,ateles)
allseqs<-c(lagomito3,lagomito4,outgroup)
allseqs<-OrientNucleotides(allseqs)
## ========================================================================================================================
## 
## Time difference of 0.05 secs
#Run the alignment
lagomito.aln2.pre<-AlignSeqs(allseqs)
## Determining distance matrix based on shared 9-mers:
## ================================================================================
## 
## Time difference of 0.1 secs
## 
## Clustering into groups by similarity:
## ================================================================================
## 
## Time difference of 0.02 secs
## 
## Aligning Sequences:
## ================================================================================
## 
## Time difference of 0.57 secs
## 
## Iteration 1 of 2:
## 
## Determining distance matrix based on alignment:
## ================================================================================
## 
## Time difference of 0.02 secs
## 
## Reclustering into groups by similarity:
## ================================================================================
## 
## Time difference of 0.03 secs
## 
## Realigning Sequences:
## ================================================================================
## 
## Time difference of 0.45 secs
## 
## Alignment converged - skipping remaining iteration.

Let’s take a look to see if we need some trimming:

BrowseSeqs(lagomito.aln2.pre, highlight=0)

Looks like we need to trim 36 bp from the front end and from 724 to the back end.

lagomito.aln2.trim<-subseq(lagomito.aln2.pre,start=36,end=724)

Let’s take a look:

BrowseSeqs(lagomito.aln2.trim, highlight=0)

Let’s see how many sequences we have for each:

length(lagomito3)
## [1] 94
length(lagomito4)
## [1] 35
length(outgroup)
## [1] 16
length(lagomito.aln2.trim)
## [1] 145

OK… so in this case there are too few sequences for Lagothrix on GenBank from Ruiz-Garcia… in the paper he reports 166 sequences, and here we only have 129 woollies.

And also how long the sequences in the alignment are:

lagomito.aln2.trim
## DNAStringSet object of length 145:
##       width seq                                             names               
##   [1]   689 GGCCCATCCAGCCCAACTAGGT...CTCATACTTATACATCGTATCA MH779997.1 Lagoth...
##   [2]   689 GGCCCATCCAGCCCAACTAGGT...CTCATACTTATACATCGTATCA MH779996.1 Lagoth...
##   [3]   689 GGCCCATCCAGCCCAACTAGGT...CTCATACTTATACATCGTATCA MH779995.1 Lagoth...
##   [4]   689 GGCCCATCCAGCCCAACTAGGT...CTCATACTTATACATCGTATCA MH779994.1 Lagoth...
##   [5]   689 GGCCCATCCAGCCCAACTAGGT...CTCATACTTATACATCGTATCA MH779993.1 Lagoth...
##   ...   ... ...
## [141]   689 GGCCCACCCAGCTCAGCTAGGA...CTCATATTTATATATTGTNTCN AF216232.1 Ateles...
## [142]   689 GGCCCACCCAGCTCGACTAGGA...CTCATACTTATATATTGTATCA AF216250.1 Ateles...
## [143]   689 GGCCCACCCAGCTCAACTAGGC...CTCATACTTATATATTGTATCA AF216247.1 Ateles...
## [144]   689 GGCCCACCCAGCTCGAGTAGGA...CTCATATTTATATNTTGTATNN AF216234.1 Ateles...
## [145]   689 GGCCCACCCAGCTCGACTAGGA...CTCATACTTATATATTGTGTCA AF216226.1 Ateles...

As you can see, the original fragment is 721 bp in the mitochondrial COX2 gene for Lagothrix, but including the outgroups has pushed us down to 689… but also the authors also report having part of COX1? So maybe that’s part of the issue, as well.

Let’s also change the names of the sequences… at the moment, they’re a bit complex:

names(lagomito.aln2.trim)
##   [1] "MH779997.1 Lagothrix tschudii haplotype 8 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                               
##   [2] "MH779996.1 Lagothrix tschudii haplotype 7 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                               
##   [3] "MH779995.1 Lagothrix tschudii haplotype 6 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                               
##   [4] "MH779994.1 Lagothrix tschudii haplotype 5 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                               
##   [5] "MH779993.1 Lagothrix tschudii haplotype 4 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                               
##   [6] "MH779992.1 Lagothrix tschudii haplotype 3 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                               
##   [7] "MH779991.1 Lagothrix tschudii haplotype 2 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                               
##   [8] "MH779990.1 Lagothrix tschudii haplotype 1 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                               
##   [9] "MH779989.1 Lagothrix poeppigii haplotype 44 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [10] "MH779988.1 Lagothrix poeppigii haplotype 43 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [11] "MH779987.1 Lagothrix poeppigii haplotype 42 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [12] "MH779986.1 Lagothrix poeppigii haplotype 41 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [13] "MH779985.1 Lagothrix poeppigii haplotype 40 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [14] "MH779984.1 Lagothrix poeppigii haplotype 39 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [15] "MH779983.1 Lagothrix poeppigii haplotype 38 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [16] "MH779982.1 Lagothrix poeppigii haplotype 37 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [17] "MH779981.1 Lagothrix poeppigii haplotype 36 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [18] "MH779980.1 Lagothrix poeppigii haplotype 35 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [19] "MH779979.1 Lagothrix poeppigii haplotype 34 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [20] "MH779978.1 UNVERIFIED: Lagothrix poeppigii haplotype 33 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [21] "MH779977.1 Lagothrix poeppigii haplotype 32 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [22] "MH779976.1 Lagothrix poeppigii haplotype 31 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [23] "MH779975.1 UNVERIFIED: Lagothrix poeppigii haplotype 30 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [24] "MH779974.1 Lagothrix poeppigii haplotype 29 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [25] "MH779973.1 Lagothrix poeppigii haplotype 28 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [26] "MH779972.1 Lagothrix poeppigii haplotype 27 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [27] "MH779971.1 UNVERIFIED: Lagothrix poeppigii haplotype 26 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [28] "MH779970.1 Lagothrix poeppigii haplotype 25 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [29] "MH779969.1 Lagothrix poeppigii haplotype 24 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [30] "MH779968.1 UNVERIFIED: Lagothrix poeppigii haplotype 23 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [31] "MH779967.1 UNVERIFIED: Lagothrix poeppigii haplotype 22 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [32] "MH779966.1 Lagothrix poeppigii haplotype 21 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [33] "MH779965.1 Lagothrix poeppigii haplotype 20 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [34] "MH779964.1 UNVERIFIED: Lagothrix poeppigii haplotype 19 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [35] "MH779963.1 UNVERIFIED: Lagothrix poeppigii haplotype 18 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [36] "MH779962.1 UNVERIFIED: Lagothrix poeppigii haplotype 17 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [37] "MH779961.1 UNVERIFIED: Lagothrix poeppigii haplotype 16 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [38] "MH779960.1 Lagothrix poeppigii haplotype 15 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [39] "MH779959.1 UNVERIFIED: Lagothrix poeppigii haplotype 14 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [40] "MH779958.1 UNVERIFIED: Lagothrix poeppigii haplotype 13 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [41] "MH779957.1 UNVERIFIED: Lagothrix poeppigii haplotype 12 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [42] "MH779956.1 Lagothrix poeppigii haplotype 11 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [43] "MH779955.1 Lagothrix poeppigii haplotype 10 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [44] "MH779954.1 Lagothrix poeppigii haplotype 9 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                              
##  [45] "MH779953.1 Lagothrix poeppigii haplotype 8 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                              
##  [46] "MH779952.1 Lagothrix poeppigii haplotype 7 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                              
##  [47] "MH779951.1 Lagothrix poeppigii haplotype 6 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                              
##  [48] "MH779950.1 Lagothrix poeppigii haplotype 5 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                              
##  [49] "MH779949.1 UNVERIFIED: Lagothrix poeppigii haplotype 4 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                        
##  [50] "MH779948.1 Lagothrix poeppigii haplotype 3 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                              
##  [51] "MH779947.1 Lagothrix poeppigii haplotype 2 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                              
##  [52] "MH779946.1 Lagothrix poeppigii haplotype 1 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                              
##  [53] "MH779945.1 Lagothrix lagotricha haplotype 16 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                            
##  [54] "MH779944.1 UNVERIFIED: Lagothrix lagotricha haplotype 15 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                      
##  [55] "MH779943.1 UNVERIFIED: Lagothrix lagotricha haplotype 14 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                      
##  [56] "MH779942.1 Lagothrix lagotricha haplotype 13 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                            
##  [57] "MH779941.1 Lagothrix lagotricha haplotype 12 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                            
##  [58] "MH779940.1 Lagothrix lagotricha haplotype 11 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                            
##  [59] "MH779939.1 Lagothrix lagotricha haplotype 10 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                            
##  [60] "MH779938.1 Lagothrix lagotricha haplotype 9 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [61] "MH779937.1 Lagothrix lagotricha haplotype 8 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [62] "MH779936.1 UNVERIFIED: Lagothrix lagotricha haplotype 7 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [63] "MH779935.1 Lagothrix lagotricha haplotype 6 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [64] "MH779934.1 Lagothrix lagotricha haplotype 5 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [65] "MH779933.1 Lagothrix lagotricha haplotype 4 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [66] "MH779932.1 UNVERIFIED: Lagothrix lagotricha haplotype 3 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                       
##  [67] "MH779931.1 Lagothrix lagotricha haplotype 2 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [68] "MH779930.1 Lagothrix lagotricha haplotype 1 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [69] "MH779929.1 Lagothrix cana haplotype 14 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                  
##  [70] "MH779928.1 Lagothrix cana haplotype 13 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                  
##  [71] "MH779927.1 Lagothrix cana haplotype 12 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                  
##  [72] "MH779926.1 UNVERIFIED: Lagothrix cana haplotype 11 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                            
##  [73] "MH779925.1 Lagothrix cana haplotype 10 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                  
##  [74] "MH779924.1 Lagothrix cana haplotype 9 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                   
##  [75] "MH779923.1 Lagothrix cana haplotype 8 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                   
##  [76] "MH779922.1 Lagothrix cana haplotype 7 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                   
##  [77] "MH779921.1 Lagothrix cana haplotype 6 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                   
##  [78] "MH779920.1 UNVERIFIED: Lagothrix cana haplotype 5 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                             
##  [79] "MH779919.1 Lagothrix cana haplotype 4 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                   
##  [80] "MH779918.1 Lagothrix cana haplotype 3 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                   
##  [81] "MH779917.1 UNVERIFIED: Lagothrix cana haplotype 2 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                             
##  [82] "MH779916.1 UNVERIFIED: Lagothrix cana haplotype 1 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                             
##  [83] "MH779915.1 Lagothrix flavicauda haplotype 1 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                             
##  [84] "MH779914.1 Lagothrix lugens haplotype 11 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                
##  [85] "MH779913.1 Lagothrix lugens haplotype 10 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                
##  [86] "MH779912.1 Lagothrix lugens haplotype 9 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                 
##  [87] "MH779911.1 UNVERIFIED: Lagothrix lugens haplotype 8 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                           
##  [88] "MH779910.1 UNVERIFIED: Lagothrix lugens haplotype 7 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                           
##  [89] "MH779909.1 UNVERIFIED: Lagothrix lugens haplotype 6 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                           
##  [90] "MH779908.1 UNVERIFIED: Lagothrix lugens haplotype 5 cytochrome oxidase subunit II-like (COII) gene, partial sequence; mitochondrial"                           
##  [91] "MH779907.1 Lagothrix lugens haplotype 4 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                 
##  [92] "MH779906.1 Lagothrix lugens haplotype 3 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                 
##  [93] "MH779905.1 Lagothrix lugens haplotype 2 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                 
##  [94] "MH779904.1 Lagothrix lugens haplotype 1 cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                 
##  [95] "HM057569.1 Lagothrix lugens cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                           
##  [96] "HM057570.1 Lagothrix lugens cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                           
##  [97] "HM057571.1 Lagothrix lugens cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                           
##  [98] "HM057572.1 Lagothrix lugens cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                           
##  [99] "HM057573.1 Lagothrix lugens cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                           
## [100] "HM057574.1 Lagothrix lugens cytochrome c oxidase subunit II-like gene, partial sequence; mitochondrial"                                                        
## [101] "HM057575.1 Lagothrix lugens cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                           
## [102] "HM057576.1 Lagothrix lagotricha cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                       
## [103] "HM057577.1 Lagothrix cana cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                             
## [104] "HM057578.1 Lagothrix cana cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                             
## [105] "HM057579.1 Lagothrix cana cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                             
## [106] "HM057580.1 Lagothrix cana cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                             
## [107] "HM057581.1 Lagothrix cana cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                             
## [108] "HM057582.1 Lagothrix poeppigii cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                        
## [109] "HM057583.1 Lagothrix lugens cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                           
## [110] "HM057584.1 Lagothrix poeppigii cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                        
## [111] "HM057585.1 Lagothrix poeppigii cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                        
## [112] "HM057586.1 Lagothrix poeppigii cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                        
## [113] "HM057587.1 Lagothrix lagotricha cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                       
## [114] "HM057588.1 Lagothrix lagotricha cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                       
## [115] "HM057589.1 Lagothrix lagotricha cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                       
## [116] "HM057590.1 Lagothrix lagotricha cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                       
## [117] "HM057591.1 Lagothrix lagotricha cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                       
## [118] "HM057592.1 Lagothrix lugens cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                           
## [119] "HM057593.1 Lagothrix cana cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                             
## [120] "HM057594.1 Lagothrix lugens cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                           
## [121] "HM057595.1 Lagothrix lagotricha cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                       
## [122] "HM057596.1 Lagothrix lagotricha cytochrome c oxidase subunit II-like gene, partial sequence; mitochondrial"                                                    
## [123] "HM057597.1 Lagothrix lugens cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                           
## [124] "HM057598.1 Lagothrix poeppigii cytochrome c oxidase subunit II-like gene, partial sequence; mitochondrial"                                                     
## [125] "HM057599.1 Lagothrix lagotricha cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                       
## [126] "HM057600.1 Lagothrix lagotricha cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                       
## [127] "HM057601.1 Lagothrix poeppigii cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                        
## [128] "HM057602.1 Lagothrix poeppigii cytochrome c oxidase subunit II (COII) gene, partial cds; mitochondrial"                                                        
## [129] "HM057603.1 Lagothrix lugens cytochrome c oxidase subunit II-like gene, partial sequence; mitochondrial"                                                        
## [130] "AF216253.1 Brachyteles arachnoides hypoxanthus cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"        
## [131] "AF352260.1 Aotus vociferans clone 331 cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"                 
## [132] "AF352258.1 Aotus nigriceps clone 12012 cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"                
## [133] "AF352255.1 Aotus nancymaae clone 12113 cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"                
## [134] "AF396459.1 Alouatta caraya cytochrome oxidase subunit II (COII) gene, partial cds; mitochondrial gene for mitochondrial product"                               
## [135] "AF216252.1 Alouatta palliata cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"                          
## [136] "AF216241.1 Ateles belzebuth chamek haplotype Abc3 cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"     
## [137] "AF216240.1 Ateles belzebuth chamek haplotype Abc6 cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"     
## [138] "AF216239.1 Ateles belzebuth chamek haplotype Abc5 cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"     
## [139] "AF216238.1 Ateles belzebuth chamek haplotype Abc4 cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"     
## [140] "AF216237.1 Ateles belzebuth chamek haplotype Abc8 cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"     
## [141] "AF216232.1 Ateles fusciceps cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"                           
## [142] "AF216250.1 Ateles paniscus haplotype App25 cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"            
## [143] "AF216247.1 Ateles paniscus haplotype App24 cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"            
## [144] "AF216234.1 Ateles geoffroyi vellerosus haplotype Agv14 cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"
## [145] "AF216226.1 Ateles belzebuth marginatus haplotype Abm2 cytochrome c oxidase subunit II (COII) gene, complete cds; mitochondrial gene for mitochondrial product"

OK… I think I see the issue… they only uploaded exemplars of each haplotype instead of the entire population of samples… so we’ll be unable to analyze population genetics here, but should be able to run the phylogenetic analysis.

Let’s only keep the GenBank accession number by erasing most of the text using the substr command to choose only characters 1-10 of the name:

names(lagomito.aln2.trim)<-substr(names(lagomito.aln2.trim),1,10)
names(lagomito.aln2.trim)
##   [1] "MH779997.1" "MH779996.1" "MH779995.1" "MH779994.1" "MH779993.1"
##   [6] "MH779992.1" "MH779991.1" "MH779990.1" "MH779989.1" "MH779988.1"
##  [11] "MH779987.1" "MH779986.1" "MH779985.1" "MH779984.1" "MH779983.1"
##  [16] "MH779982.1" "MH779981.1" "MH779980.1" "MH779979.1" "MH779978.1"
##  [21] "MH779977.1" "MH779976.1" "MH779975.1" "MH779974.1" "MH779973.1"
##  [26] "MH779972.1" "MH779971.1" "MH779970.1" "MH779969.1" "MH779968.1"
##  [31] "MH779967.1" "MH779966.1" "MH779965.1" "MH779964.1" "MH779963.1"
##  [36] "MH779962.1" "MH779961.1" "MH779960.1" "MH779959.1" "MH779958.1"
##  [41] "MH779957.1" "MH779956.1" "MH779955.1" "MH779954.1" "MH779953.1"
##  [46] "MH779952.1" "MH779951.1" "MH779950.1" "MH779949.1" "MH779948.1"
##  [51] "MH779947.1" "MH779946.1" "MH779945.1" "MH779944.1" "MH779943.1"
##  [56] "MH779942.1" "MH779941.1" "MH779940.1" "MH779939.1" "MH779938.1"
##  [61] "MH779937.1" "MH779936.1" "MH779935.1" "MH779934.1" "MH779933.1"
##  [66] "MH779932.1" "MH779931.1" "MH779930.1" "MH779929.1" "MH779928.1"
##  [71] "MH779927.1" "MH779926.1" "MH779925.1" "MH779924.1" "MH779923.1"
##  [76] "MH779922.1" "MH779921.1" "MH779920.1" "MH779919.1" "MH779918.1"
##  [81] "MH779917.1" "MH779916.1" "MH779915.1" "MH779914.1" "MH779913.1"
##  [86] "MH779912.1" "MH779911.1" "MH779910.1" "MH779909.1" "MH779908.1"
##  [91] "MH779907.1" "MH779906.1" "MH779905.1" "MH779904.1" "HM057569.1"
##  [96] "HM057570.1" "HM057571.1" "HM057572.1" "HM057573.1" "HM057574.1"
## [101] "HM057575.1" "HM057576.1" "HM057577.1" "HM057578.1" "HM057579.1"
## [106] "HM057580.1" "HM057581.1" "HM057582.1" "HM057583.1" "HM057584.1"
## [111] "HM057585.1" "HM057586.1" "HM057587.1" "HM057588.1" "HM057589.1"
## [116] "HM057590.1" "HM057591.1" "HM057592.1" "HM057593.1" "HM057594.1"
## [121] "HM057595.1" "HM057596.1" "HM057597.1" "HM057598.1" "HM057599.1"
## [126] "HM057600.1" "HM057601.1" "HM057602.1" "HM057603.1" "AF216253.1"
## [131] "AF352260.1" "AF352258.1" "AF352255.1" "AF396459.1" "AF216252.1"
## [136] "AF216241.1" "AF216240.1" "AF216239.1" "AF216238.1" "AF216237.1"
## [141] "AF216232.1" "AF216250.1" "AF216247.1" "AF216234.1" "AF216226.1"

Let’s also now import a text file I created that contains the sample and population information gleaned from the GenBank info, since these data are not explicitly stated in Ruiz-Garcia et al. (2019):

popinfo2<-read.table("~/Desktop/woolly_genomics/mitogenomes/Lagothrix_mitogenomes/RuizGarcia_Info.txt", sep = ",", header=TRUE, comment.char = "#")
rownames(popinfo2)<-popinfo2$GenBank
popinfo2
##               GenBank                       Taxon Haplotype Sample
## AF216226.1 AF216226.1 Ateles belzebuth marginatus      Abm2   <NA>
## AF216234.1 AF216234.1 Ateles geoffroyi vellerosus     Agv14   <NA>
## AF216247.1 AF216247.1             Ateles paniscus     App24   <NA>
## AF216250.1 AF216250.1             Ateles paniscus     App25   <NA>
## AF216232.1 AF216232.1            Ateles fusciceps        Af   <NA>
## AF216237.1 AF216237.1     Ateles belzebuth chamek      Abc8   <NA>
## AF216238.1 AF216238.1     Ateles belzebuth chamek      Abc4   <NA>
## AF216239.1 AF216239.1     Ateles belzebuth chamek      Abc5   <NA>
## AF216240.1 AF216240.1     Ateles belzebuth chamek      Abc6   <NA>
## AF216241.1 AF216241.1     Ateles belzebuth chamek      Abc3   <NA>
## AF216252.1 AF216252.1           Alouatta palliata        WI   <NA>
## AF396459.1 AF396459.1             Alouatta caraya      <NA>   <NA>
## AF352255.1 AF352255.1             Aotus nancymaae     12113   <NA>
## AF352258.1 AF352258.1             Aotus nigriceps     12012   <NA>
## AF352260.1 AF352260.1            Aotus vociferans       331   <NA>
## AF216253.1 AF216253.1     Brachyteles hypoxanthus         1   <NA>
## HM057603.1 HM057603.1            Lagothrix lugens      <NA>      6
## HM057602.1 HM057602.1         Lagothrix poeppigii      <NA>     16
## HM057601.1 HM057601.1         Lagothrix poeppigii      <NA>     15
## HM057600.1 HM057600.1       Lagothrix lagothricha      <NA>     13
## HM057599.1 HM057599.1       Lagothrix lagothricha      <NA>     12
## HM057598.1 HM057598.1         Lagothrix poeppigii      <NA>     jd
## HM057597.1 HM057597.1            Lagothrix lugens      <NA>     80
## HM057596.1 HM057596.1       Lagothrix lagothricha      <NA>    097
## HM057595.1 HM057595.1       Lagothrix lagothricha      <NA>     23
## HM057594.1 HM057594.1            Lagothrix lugens      <NA>     17
## HM057593.1 HM057593.1              Lagothrix cana      <NA>    005
## HM057592.1 HM057592.1            Lagothrix lugens      <NA>     96
## HM057591.1 HM057591.1       Lagothrix lagothricha      <NA>     87
## HM057590.1 HM057590.1       Lagothrix lagothricha      <NA>     37
## HM057589.1 HM057589.1       Lagothrix lagothricha      <NA>     63
## HM057588.1 HM057588.1       Lagothrix lagothricha      <NA>     62
## HM057587.1 HM057587.1       Lagothrix lagothricha      <NA>     61
## HM057586.1 HM057586.1         Lagothrix poeppigii      <NA>     54
## HM057585.1 HM057585.1         Lagothrix poeppigii      <NA>     52
## HM057584.1 HM057584.1         Lagothrix poeppigii      <NA>     49
## HM057583.1 HM057583.1            Lagothrix lugens      <NA>     47
## HM057582.1 HM057582.1         Lagothrix poeppigii      <NA>     46
## HM057581.1 HM057581.1              Lagothrix cana      <NA>     31
## HM057580.1 HM057580.1              Lagothrix cana      <NA>     29
## HM057579.1 HM057579.1              Lagothrix cana      <NA>     23
## HM057578.1 HM057578.1              Lagothrix cana      <NA>     22
## HM057577.1 HM057577.1              Lagothrix cana      <NA>     18
## HM057576.1 HM057576.1       Lagothrix lagothricha      <NA>     07
## HM057575.1 HM057575.1            Lagothrix lugens      <NA>     06
## HM057574.1 HM057574.1            Lagothrix lugens      <NA>      4
## HM057573.1 HM057573.1            Lagothrix lugens      <NA>   wspa
## HM057572.1 HM057572.1            Lagothrix lugens      <NA>      2
## HM057571.1 HM057571.1            Lagothrix lugens      <NA>     02
## HM057570.1 HM057570.1            Lagothrix lugens      <NA>   1114
## HM057569.1 HM057569.1            Lagothrix lugens      <NA>   1057
## MH779997.1 MH779997.1          Lagothrix tschudii         8   <NA>
## MH779996.1 MH779996.1          Lagothrix tschudii         7   <NA>
## MH779995.1 MH779995.1          Lagothrix tschudii         6   <NA>
## MH779994.1 MH779994.1          Lagothrix tschudii         5   <NA>
## MH779993.1 MH779993.1          Lagothrix tschudii         4   <NA>
## MH779992.1 MH779992.1          Lagothrix tschudii         3   <NA>
## MH779991.1 MH779991.1          Lagothrix tschudii         2   <NA>
## MH779990.1 MH779990.1          Lagothrix tschudii         1   <NA>
## MH779989.1 MH779989.1         Lagothrix poeppigii        44   <NA>
## MH779988.1 MH779988.1         Lagothrix poeppigii        43   <NA>
## MH779987.1 MH779987.1         Lagothrix poeppigii        42   <NA>
## MH779986.1 MH779986.1         Lagothrix poeppigii        41   <NA>
## MH779985.1 MH779985.1         Lagothrix poeppigii        40   <NA>
## MH779984.1 MH779984.1         Lagothrix poeppigii        39   <NA>
## MH779983.1 MH779983.1         Lagothrix poeppigii        38   <NA>
## MH779982.1 MH779982.1         Lagothrix poeppigii        37   <NA>
## MH779981.1 MH779981.1         Lagothrix poeppigii        36   <NA>
## MH779980.1 MH779980.1         Lagothrix poeppigii        35   <NA>
## MH779979.1 MH779979.1         Lagothrix poeppigii        34   <NA>
## MH779978.1 MH779978.1         Lagothrix poeppigii        33   <NA>
## MH779977.1 MH779977.1         Lagothrix poeppigii        32   <NA>
## MH779976.1 MH779976.1         Lagothrix poeppigii        31   <NA>
## MH779975.1 MH779975.1         Lagothrix poeppigii        30   <NA>
## MH779974.1 MH779974.1         Lagothrix poeppigii        29   <NA>
## MH779973.1 MH779973.1         Lagothrix poeppigii        28   <NA>
## MH779972.1 MH779972.1         Lagothrix poeppigii        27   <NA>
## MH779971.1 MH779971.1         Lagothrix poeppigii        26   <NA>
## MH779970.1 MH779970.1         Lagothrix poeppigii        25   <NA>
## MH779969.1 MH779969.1         Lagothrix poeppigii        24   <NA>
## MH779968.1 MH779968.1         Lagothrix poeppigii        23   <NA>
## MH779967.1 MH779967.1         Lagothrix poeppigii        22   <NA>
## MH779966.1 MH779966.1         Lagothrix poeppigii        21   <NA>
## MH779965.1 MH779965.1         Lagothrix poeppigii        20   <NA>
## MH779964.1 MH779964.1         Lagothrix poeppigii        19   <NA>
## MH779963.1 MH779963.1         Lagothrix poeppigii        18   <NA>
## MH779962.1 MH779962.1         Lagothrix poeppigii        17   <NA>
## MH779961.1 MH779961.1         Lagothrix poeppigii        16   <NA>
## MH779960.1 MH779960.1         Lagothrix poeppigii        15   <NA>
## MH779959.1 MH779959.1         Lagothrix poeppigii        14   <NA>
## MH779958.1 MH779958.1         Lagothrix poeppigii        13   <NA>
## MH779957.1 MH779957.1         Lagothrix poeppigii        12   <NA>
## MH779956.1 MH779956.1         Lagothrix poeppigii        11   <NA>
## MH779955.1 MH779955.1         Lagothrix poeppigii        10   <NA>
## MH779954.1 MH779954.1         Lagothrix poeppigii         9   <NA>
## MH779953.1 MH779953.1         Lagothrix poeppigii         8   <NA>
## MH779952.1 MH779952.1         Lagothrix poeppigii         7   <NA>
## MH779951.1 MH779951.1         Lagothrix poeppigii         6   <NA>
## MH779950.1 MH779950.1         Lagothrix poeppigii         5   <NA>
## MH779949.1 MH779949.1         Lagothrix poeppigii         4   <NA>
## MH779948.1 MH779948.1         Lagothrix poeppigii         3   <NA>
## MH779947.1 MH779947.1         Lagothrix poeppigii         2   <NA>
## MH779946.1 MH779946.1         Lagothrix poeppigii         1   <NA>
## MH779945.1 MH779945.1       Lagothrix lagothricha        16   <NA>
## MH779944.1 MH779944.1       Lagothrix lagothricha        15   <NA>
## MH779943.1 MH779943.1       Lagothrix lagothricha        14   <NA>
## MH779942.1 MH779942.1       Lagothrix lagothricha        13   <NA>
## MH779941.1 MH779941.1       Lagothrix lagothricha        12   <NA>
## MH779940.1 MH779940.1       Lagothrix lagothricha        11   <NA>
## MH779939.1 MH779939.1       Lagothrix lagothricha        10   <NA>
## MH779938.1 MH779938.1       Lagothrix lagothricha         9   <NA>
## MH779937.1 MH779937.1       Lagothrix lagothricha         8   <NA>
## MH779936.1 MH779936.1       Lagothrix lagothricha         7   <NA>
## MH779935.1 MH779935.1       Lagothrix lagothricha         6   <NA>
## MH779934.1 MH779934.1       Lagothrix lagothricha         5   <NA>
## MH779933.1 MH779933.1       Lagothrix lagothricha         4   <NA>
## MH779932.1 MH779932.1       Lagothrix lagothricha         3   <NA>
## MH779931.1 MH779931.1       Lagothrix lagothricha         2   <NA>
## MH779930.1 MH779930.1       Lagothrix lagothricha         1   <NA>
## MH779929.1 MH779929.1              Lagothrix cana        14   <NA>
## MH779928.1 MH779928.1              Lagothrix cana        13   <NA>
## MH779927.1 MH779927.1              Lagothrix cana        12   <NA>
## MH779926.1 MH779926.1              Lagothrix cana        11   <NA>
## MH779925.1 MH779925.1              Lagothrix cana        10   <NA>
## MH779924.1 MH779924.1              Lagothrix cana         9   <NA>
## MH779923.1 MH779923.1              Lagothrix cana         8   <NA>
## MH779922.1 MH779922.1              Lagothrix cana         7   <NA>
## MH779921.1 MH779921.1              Lagothrix cana         6   <NA>
## MH779920.1 MH779920.1              Lagothrix cana         5   <NA>
## MH779919.1 MH779919.1              Lagothrix cana         4   <NA>
## MH779918.1 MH779918.1              Lagothrix cana         3   <NA>
## MH779917.1 MH779917.1              Lagothrix cana         2   <NA>
## MH779916.1 MH779916.1              Lagothrix cana         1   <NA>
## MH779915.1 MH779915.1        Lagothrix flavicauda         1   <NA>
## MH779914.1 MH779914.1            Lagothrix lugens        11   <NA>
## MH779913.1 MH779913.1            Lagothrix lugens        10   <NA>
## MH779912.1 MH779912.1            Lagothrix lugens         9   <NA>
## MH779911.1 MH779911.1            Lagothrix lugens         8   <NA>
## MH779910.1 MH779910.1            Lagothrix lugens         7   <NA>
## MH779909.1 MH779909.1            Lagothrix lugens         6   <NA>
## MH779908.1 MH779908.1            Lagothrix lugens         5   <NA>
## MH779907.1 MH779907.1            Lagothrix lugens         4   <NA>
## MH779906.1 MH779906.1            Lagothrix lugens         3   <NA>
## MH779905.1 MH779905.1            Lagothrix lugens         2   <NA>
## MH779904.1 MH779904.1            Lagothrix lugens         1   <NA>
##                         Location  Country Year
## AF216226.1                  <NA>     <NA> 2018
## AF216234.1                  <NA>     <NA> 2018
## AF216247.1                  <NA>     <NA> 2018
## AF216250.1                  <NA>     <NA> 2018
## AF216232.1                  <NA>     <NA> 2018
## AF216237.1                  <NA>     <NA> 2018
## AF216238.1                  <NA>     <NA> 2018
## AF216239.1                  <NA>     <NA> 2018
## AF216240.1                  <NA>     <NA> 2018
## AF216241.1                  <NA>     <NA> 2018
## AF216252.1                  <NA>     <NA> 2018
## AF396459.1                  <NA>     <NA> 2018
## AF352255.1                  <NA>     <NA> 2018
## AF352258.1                  <NA>     <NA> 2018
## AF352260.1                  <NA>     <NA> 2018
## AF216253.1                  <NA>     <NA> 2018
## HM057603.1                  <NA> Colombia 2010
## HM057602.1                  <NA>     Peru 2010
## HM057601.1                  <NA>     Peru 2010
## HM057600.1                  <NA> Colombia 2010
## HM057599.1                  <NA> Colombia 2010
## HM057598.1                  <NA>     Peru 2010
## HM057597.1                  <NA> Colombia 2010
## HM057596.1                  <NA> Colombia 2010
## HM057595.1                  <NA> Colombia 2010
## HM057594.1                  <NA> Colombia 2010
## HM057593.1                  <NA>   Brazil 2010
## HM057592.1                  <NA> Colombia 2010
## HM057591.1                  <NA> Colombia 2010
## HM057590.1                  <NA> Colombia 2010
## HM057589.1                  <NA>   Brazil 2010
## HM057588.1                  <NA>   Brazil 2010
## HM057587.1                  <NA>   Brazil 2010
## HM057586.1 Requena-Tapiche River     Peru 2010
## HM057585.1 Requena-Tapiche River     Peru 2010
## HM057584.1 Requena-Tapiche River     Peru 2010
## HM057583.1                  <NA> Colombia 2010
## HM057582.1 Requena-Tapiche River     Peru 2010
## HM057581.1                  <NA>   Brazil 2010
## HM057580.1                  <NA>   Brazil 2010
## HM057579.1                  <NA>   Brazil 2010
## HM057578.1                  <NA>   Brazil 2010
## HM057577.1                  <NA>   Brazil 2010
## HM057576.1                  <NA> Colombia 2010
## HM057575.1                  <NA> Colombia 2010
## HM057574.1                  <NA> Colombia 2010
## HM057573.1                  <NA> Colombia 2010
## HM057572.1                  <NA> Colombia 2010
## HM057571.1                  <NA> Colombia 2010
## HM057570.1                  <NA> Colombia 2010
## HM057569.1                  <NA> Colombia 2010
## MH779997.1                  <NA>     <NA> 2018
## MH779996.1                  <NA>     <NA> 2018
## MH779995.1                  <NA>     <NA> 2018
## MH779994.1                  <NA>     <NA> 2018
## MH779993.1                  <NA>     <NA> 2018
## MH779992.1                  <NA>     <NA> 2018
## MH779991.1                  <NA>     <NA> 2018
## MH779990.1                  <NA>     <NA> 2018
## MH779989.1                  <NA>     <NA> 2018
## MH779988.1                  <NA>     <NA> 2018
## MH779987.1                  <NA>     <NA> 2018
## MH779986.1                  <NA>     <NA> 2018
## MH779985.1                  <NA>     <NA> 2018
## MH779984.1                  <NA>     <NA> 2018
## MH779983.1                  <NA>     <NA> 2018
## MH779982.1                  <NA>     <NA> 2018
## MH779981.1                  <NA>     <NA> 2018
## MH779980.1                  <NA>     <NA> 2018
## MH779979.1                  <NA>     <NA> 2018
## MH779978.1                  <NA>     <NA> 2018
## MH779977.1                  <NA>     <NA> 2018
## MH779976.1                  <NA>     <NA> 2018
## MH779975.1                  <NA>     <NA> 2018
## MH779974.1                  <NA>     <NA> 2018
## MH779973.1                  <NA>     <NA> 2018
## MH779972.1                  <NA>     <NA> 2018
## MH779971.1                  <NA>     <NA> 2018
## MH779970.1                  <NA>     <NA> 2018
## MH779969.1                  <NA>     <NA> 2018
## MH779968.1                  <NA>     <NA> 2018
## MH779967.1                  <NA>     <NA> 2018
## MH779966.1                  <NA>     <NA> 2018
## MH779965.1                  <NA>     <NA> 2018
## MH779964.1                  <NA>     <NA> 2018
## MH779963.1                  <NA>     <NA> 2018
## MH779962.1                  <NA>     <NA> 2018
## MH779961.1                  <NA>     <NA> 2018
## MH779960.1                  <NA>     <NA> 2018
## MH779959.1                  <NA>     <NA> 2018
## MH779958.1                  <NA>     <NA> 2018
## MH779957.1                  <NA>     <NA> 2018
## MH779956.1                  <NA>     <NA> 2018
## MH779955.1                  <NA>     <NA> 2018
## MH779954.1                  <NA>     <NA> 2018
## MH779953.1                  <NA>     <NA> 2018
## MH779952.1                  <NA>     <NA> 2018
## MH779951.1                  <NA>     <NA> 2018
## MH779950.1                  <NA>     <NA> 2018
## MH779949.1                  <NA>     <NA> 2018
## MH779948.1                  <NA>     <NA> 2018
## MH779947.1                  <NA>     <NA> 2018
## MH779946.1                  <NA>     <NA> 2018
## MH779945.1                  <NA>     <NA> 2018
## MH779944.1                  <NA>     <NA> 2018
## MH779943.1                  <NA>     <NA> 2018
## MH779942.1                  <NA>     <NA> 2018
## MH779941.1                  <NA>     <NA> 2018
## MH779940.1                  <NA>     <NA> 2018
## MH779939.1                  <NA>     <NA> 2018
## MH779938.1                  <NA>     <NA> 2018
## MH779937.1                  <NA>     <NA> 2018
## MH779936.1                  <NA>     <NA> 2018
## MH779935.1                  <NA>     <NA> 2018
## MH779934.1                  <NA>     <NA> 2018
## MH779933.1                  <NA>     <NA> 2018
## MH779932.1                  <NA>     <NA> 2018
## MH779931.1                  <NA>     <NA> 2018
## MH779930.1                  <NA>     <NA> 2018
## MH779929.1                  <NA>     <NA> 2018
## MH779928.1                  <NA>     <NA> 2018
## MH779927.1                  <NA>     <NA> 2018
## MH779926.1                  <NA>     <NA> 2018
## MH779925.1                  <NA>     <NA> 2018
## MH779924.1                  <NA>     <NA> 2018
## MH779923.1                  <NA>     <NA> 2018
## MH779922.1                  <NA>     <NA> 2018
## MH779921.1                  <NA>     <NA> 2018
## MH779920.1                  <NA>     <NA> 2018
## MH779919.1                  <NA>     <NA> 2018
## MH779918.1                  <NA>     <NA> 2018
## MH779917.1                  <NA>     <NA> 2018
## MH779916.1                  <NA>     <NA> 2018
## MH779915.1                  <NA>     <NA> 2018
## MH779914.1                  <NA>     <NA> 2018
## MH779913.1                  <NA>     <NA> 2018
## MH779912.1                  <NA>     <NA> 2018
## MH779911.1                  <NA>     <NA> 2018
## MH779910.1                  <NA>     <NA> 2018
## MH779909.1                  <NA>     <NA> 2018
## MH779908.1                  <NA>     <NA> 2018
## MH779907.1                  <NA>     <NA> 2018
## MH779906.1                  <NA>     <NA> 2018
## MH779905.1                  <NA>     <NA> 2018
## MH779904.1                  <NA>     <NA> 2018

As you can see, Ruiz-Garcia and colleagues have kept their cards annoyingly close to the chest… they only include unique haplotypes for their data on GenBank, which means we cannot really replicate their analyses because we don’t actually have population data. It’s also unclear how related the HM and MH accessions might be (I suppose we’ll find out here). We can do our best to approximate their tree and network outputs, though…

From here, we can subset our alignment file by name to only include those for which we have population data from the paper (essentially just choosing those elements of lagomito.aln that are also named in the popinfo column called GenBank:

lagomito.aln2<-lagomito.aln2.trim[popinfo2$GenBank]
length(lagomito.aln2)
## [1] 145

Ok, that worked!

For now, let’s only include those published in association with the 2019 paper:

popinfo2019<-dplyr::filter(popinfo2,Year=="2018") %>% filter(GenBank != "MH779909.1" & GenBank != "MH779908.1")
popinfo2019.lag<-dplyr::filter(popinfo2019,
                               Taxon != "Aotus vociferans" &
                               Taxon != "Aotus nigriceps" & 
                               Taxon != "Aotus nancymaae" &  
                               Taxon != "Alouatta palliata" &
                               Taxon != "Alouatta caraya" &
                               Taxon != "Ateles belzebuth chamek" &
                               Taxon != "Ateles paniscus" &
                               Taxon != "Ateles fusciceps" &
                               Taxon != "Ateles geoffroyi vellerosus" &
                               Taxon != "Ateles belzebuth marginatus" &
                               Taxon != "Brachyteles hypoxanthus")

lagomito.aln2.2019<-lagomito.aln2[popinfo2019$GenBank] %>% droplevels()
lagomito.aln2.2019.lag<-lagomito.aln2[popinfo2019.lag$GenBank] %>% droplevels()

Haplotype Network

Now we’ll load the package we’ll use to construct our haplotype network, called {geneHapR}:

library(geneHapR)

And import our sequences into the format needed by the package:

hapResult2 <- seqs2hap(lagomito.aln2.2019.lag,
                      Ref = names(lagomito.aln2.2019.lag)[1],
                      hapPrefix = "H",
                      hetero_remove = TRUE,
                      na_drop = TRUE,
                      maxGapsPerSeq = 0.25)

We can then query how many of the sites in our 431 bp sequence are informing haplotype variation in our sample (in other words, how many segregating sites do we have):

sites(hapResult2)
## [1] 247

Ok, so 247 sites are informing the haplotype results (it was 259 when including two very divergent L. lugens samples!)… let’s now get a summary of our haplotypes:

hapSummary2 <- hap_summary(hapResult2)
print(hapSummary2)
## 
## Accssions: 89
## Sites: 247
##   Indels: 4
##   SNPs:   243
## 
## Haplotypes: 86 
##   H001   2   MH779956.1, MH779955.1  
##   H002   2   MH779988.1, MH779987.1  
##   H003   2   MH779912.1, MH779904.1  
##   H004   1   MH779982.1  
##   H005   1   MH779923.1  
##   H006   1   MH779925.1  
##   H007   1   MH779926.1  
##   H008   1   MH779922.1  
##   H009   1   MH779974.1  
##   H010   1   MH779981.1  
##   H011   1   MH779972.1  
##   H012   1   MH779975.1  
##   H013   1   MH779977.1  
##   H014   1   MH779978.1  
##   H015   1   MH779976.1  
##   H016   1   MH779985.1  
##   H017   1   MH779986.1  
##   H018   1   MH779937.1  
##   H019   1   MH779942.1  
##   H020   1   MH779959.1  
##   H021   1   MH779964.1  
##   H022   1   MH779947.1  
##   H023   1   MH779995.1  
##   H024   1   MH779994.1  
##   H025   1   MH779915.1  
##   H026   1   MH779962.1  
##   H027   1   MH779946.1  
##   H028   1   MH779953.1  
##   H029   1   MH779961.1  
##   H030   1   MH779906.1  
##   H031   1   MH779983.1  
##   H032   1   MH779989.1  
##   H033   1   MH779951.1  
##   H034   1   MH779966.1  
##   H035   1   MH779957.1  
##   H036   1   MH779952.1  
##   H037   1   MH779935.1  
##   H038   1   MH779938.1  
##   H039   1   MH779930.1  
##   H040   1   MH779934.1  
##   H041   1   MH779931.1  
##   H042   1   MH779940.1  
##   H043   1   MH779943.1  
##   H044   1   MH779939.1  
##   H045   1   MH779960.1  
##   H046   1   MH779969.1  
##   H047   1   MH779984.1  
##   H048   1   MH779941.1  
##   H049   1   MH779945.1  
##   H050   1   MH779905.1  
##   H051   1   MH779907.1  
##   H052   1   MH779990.1  
##   H053   1   MH779996.1  
##   H054   1   MH779991.1  
##   H055   1   MH779967.1  
##   H056   1   MH779971.1  
##   H057   1   MH779993.1  
##   H058   1   MH779997.1  
##   H059   1   MH779968.1  
##   H060   1   MH779958.1  
##   H061   1   MH779992.1  
##   H062   1   MH779936.1  
##   H063   1   MH779950.1  
##   H064   1   MH779921.1  
##   H065   1   MH779918.1  
##   H066   1   MH779920.1  
##   H067   1   MH779916.1  
##   H068   1   MH779919.1  
##   H069   1   MH779914.1  
##   H070   1   MH779949.1  
##   H071   1   MH779917.1  
##   H072   1   MH779963.1  
##   H073   1   MH779948.1  
##   H074   1   MH779932.1  
##   H075   1   MH779933.1  
##   H076   1   MH779965.1  
##   H077   1   MH779927.1  
##   H078   1   MH779911.1  
##   H079   1   MH779924.1  
##   H080   1   MH779913.1  
##   H081   1   MH779954.1  
##   H082   1   MH779944.1  
##   H083   1   MH779980.1  
##   H084   1   MH779979.1  
##   H085   1   MH779929.1  
##   H086   1   MH779928.1  
##   
## Options:
##  hapPrefix:  H
##  hetero_remove:  YES
##  NA_remove:  YES
## 
## # A tibble: 90 × 250
##   Hap    `2`   `3`   `4`   `5`   `6`   `7`   `8`   `9`   `10`  `11`  `12`  `13` 
##   <chr>  <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 CHR    Chr0  Chr0  Chr0  Chr0  Chr0  Chr0  Chr0  Chr0  Chr0  Chr0  Chr0  Chr0 
## 2 POS    2     3     4     5     6     7     8     9     10    11    12    13   
## 3 INFO   <NA>  <NA>  <NA>  <NA>  <NA>  <NA>  <NA>  <NA>  <NA>  <NA>  <NA>  <NA> 
## 4 ALLELE G/C   C/A,… C/A,… C/A,G A/T,C T/A   C/G,T C/A   A/T,G G/T   C/A,T C/T  
## 5 H001   C     C     C     C     A     T     C     C     A     G     C     C    
## 6 H002   G     C     C     C     A     T     C     C     A     G     A     C    
## 7 H003   G     C     C     C     A     T     C     C     A     G     C     C

With this output, not only can we see the sequence content (i.e., variants) in each haplotype, but we can also see which individuals belong to the same haplotype.

We can also plot a haplotype table if we want to visualize the variants, although it’s not super helpful given how cramped it is…

plotHapTable(hapSummary2,
             title = "Lagothrix COX2 Haplotypes")
## Indel replcements are:
## AA->i1; CC->i2; CT->i3; CA->i4; AT->i5; GT->i6

Now let’s calculate our haplotype network, importing our popinfo so that we can group our haplotypes by Population:

hapNet2 <- get_hapNet(hapSummary2,
                     AccINFO = popinfo2019.lag,
                     groupName = "Taxon")

And now let’s plot it to replicate Figure 3 in the Ruiz-Garcia 2019 paper (I’ve defined the colors to match those) :

plotHapNet(hapNet2,
           size = "freq",                   # circle size
           scale = "log10",                 # scale circle with 'log10(size + 1)'
           cex = 1,                       # size of hap symbol
           col.link = 1,                    # link colors
           link.width = 1,                  # link widths
           show.mutation = 2,               # mutation types one of c(0,1,2,3)
           #hapGroup = 61,                   # draw pie charts for each haplotype
           legend = c(15, 50),            # legend position
           show_color_legend = TRUE,
           show_size_legend = TRUE,
           labels = F,
           pie.lim = c(2, 5),
           backGround=c("black","red3","dodgerblue","hotpink","yellow","green"))        

Right… so this looks very different… at first, it was driven by two L. lugens samples that were waaaay off, then represented by H064 (MH779909.1) and H071 (MH779908.1). Now that I’ve cut them, it’s still not looking quite right…

Population Genetics

For the population genetics analyses they do, we can use the {poppr} and {hierfstat} packages.

Convert to GENIND/GENlight

First, we need to convert our sequence data into GENIND and GENlight objects with our population data added as strata:

library(adegenet)
library(hierfstat)
#Convert DNAStringSet to Genind:
lagomito.gen2<-adegenet::DNAbin2genind(ape::as.DNAbin(lagomito.aln2.2019.lag))

#Now we need to add our population data to the GENIND object:
strata(lagomito.gen2) <- popinfo2019.lag[(match(indNames(lagomito.gen2), popinfo2019.lag$GenBank)), ]

#And setting the Taxon variable as the population:
setPop(lagomito.gen2) <- ~Taxon

#let's also conver to a GENLIGHT object:
lagomito.glt2<-dartR::gi2gl(lagomito.gen2)
## Starting :: 
##  Starting dartR 
##  Starting gi2gl 
## Starting gl.compliance.check 
##   Processing genlight object with SNP data
##   The slot loc.all, which stores allele name for each locus, is empty. 
## Creating a dummy variable (A/C) to insert in this slot. 
##   Checking coding of SNPs
##     SNP data scored NA, 0, 1 or 2 confirmed
##   Checking locus metrics and flags
##   Recalculating locus metrics
##   Checking for monomorphic loci
##     No monomorphic loci detected
##   Checking for loci with all missing data
##     No loci with all missing data detected
##   Checking whether individual names are unique.
##   Checking for individual metrics
##   Warning: Creating a slot for individual metrics
##   Checking for population assignments
##     Population assignments confirmed
##   Spelling of coordinates checked and changed if necessary to 
##             lat/lon
## Completed: gl.compliance.check 
## Completed: :: 
##  Completed: dartR 
##  Completed: gi2gl

Ok, now that we have these we can run our stats!

AMOVA

We can use {poppr} to run the AMOVA:

library(poppr)
amova <- poppr.amova(lagomito.gen2, ~Taxon)
## 
##  No loci with missing values above 5% found.
amova
## $call
## ade4::amova(samples = xtab, distances = xdist, structures = xstruct)
## 
## $results
##                 Df    Sum Sq  Mean Sq
## Between samples  5  490.4583 98.09166
## Within samples  86 1122.7670 13.05543
## Total           91 1613.2253 17.72775
## 
## $componentsofcovariance
##                                 Sigma         %
## Variations  Between samples  6.596402  33.56635
## Variations  Within samples  13.055430  66.43365
## Total variations            19.651832 100.00000
## 
## $statphi
##                         Phi
## Phi-samples-total 0.3356635

Ok, so in this case, the $statPhi outputs give us our FST, FCT, and FSC values from Table 4, along with the amount of genetic variation explained and respective p-values, so that’s good!

FST

Now, we can check out pairwise FST for the populations:

library(hierfstat)
wc(lagomito.gen2)
## $FST
## [1] 0.01279108
## 
## $FIS
## [1] -0.9487175
lagoFst2 <- pairwise.neifst(lagomito.gen2)
knitr::kable(lagoFst2)
Lagothrix tschudii Lagothrix poeppigii Lagothrix lagothricha Lagothrix cana Lagothrix flavicauda Lagothrix lugens
Lagothrix tschudii NA 0.0119 0.0130 0.0119 0.0252 0.0105
Lagothrix poeppigii 0.0119 NA 0.0121 0.0159 0.0170 0.0084
Lagothrix lagothricha 0.0130 0.0121 NA 0.0176 0.0274 0.0074
Lagothrix cana 0.0119 0.0159 0.0176 NA 0.0232 0.0152
Lagothrix flavicauda 0.0252 0.0170 0.0274 0.0232 NA 0.0191
Lagothrix lugens 0.0105 0.0084 0.0074 0.0152 0.0191 NA

Hmmmm…

Here we can get p-values:

library(StAMPP)
stamppFst(lagomito.glt2,nboots=100,percent=95,nclusters=1)
## $Fsts
##                       Lagothrix tschudii Lagothrix poeppigii
## Lagothrix tschudii                    NA                  NA
## Lagothrix poeppigii           0.02607980                  NA
## Lagothrix lagothricha         0.03132779          0.02741285
## Lagothrix cana                0.02712932          0.03573399
## Lagothrix flavicauda          0.05798241          0.04143169
## Lagothrix lugens              0.02542713          0.01922409
##                       Lagothrix lagothricha Lagothrix cana Lagothrix flavicauda
## Lagothrix tschudii                       NA             NA                   NA
## Lagothrix poeppigii                      NA             NA                   NA
## Lagothrix lagothricha                    NA             NA                   NA
## Lagothrix cana                   0.04122628             NA                   NA
## Lagothrix flavicauda             0.06622645     0.05395207                   NA
## Lagothrix lugens                 0.01802962     0.03576527           0.04852172
##                       Lagothrix lugens
## Lagothrix tschudii                  NA
## Lagothrix poeppigii                 NA
## Lagothrix lagothricha               NA
## Lagothrix cana                      NA
## Lagothrix flavicauda                NA
## Lagothrix lugens                    NA
## 
## $Pvalues
##                       Lagothrix tschudii Lagothrix poeppigii
## Lagothrix tschudii                    NA                  NA
## Lagothrix poeppigii                    0                  NA
## Lagothrix lagothricha                  0                   0
## Lagothrix cana                         0                   0
## Lagothrix flavicauda                   0                   0
## Lagothrix lugens                       0                   0
##                       Lagothrix lagothricha Lagothrix cana Lagothrix flavicauda
## Lagothrix tschudii                       NA             NA                   NA
## Lagothrix poeppigii                      NA             NA                   NA
## Lagothrix lagothricha                    NA             NA                   NA
## Lagothrix cana                            0             NA                   NA
## Lagothrix flavicauda                      0              0                   NA
## Lagothrix lugens                          0              0                    0
##                       Lagothrix lugens
## Lagothrix tschudii                  NA
## Lagothrix poeppigii                 NA
## Lagothrix lagothricha               NA
## Lagothrix cana                      NA
## Lagothrix flavicauda                NA
## Lagothrix lugens                    NA
## 
## $Bootstraps
##              Population1           Population2           1           2
## 1     Lagothrix tschudii   Lagothrix poeppigii 0.007339989 0.008446882
## 2     Lagothrix tschudii Lagothrix lagothricha 0.011511735 0.012076023
## 3     Lagothrix tschudii        Lagothrix cana 0.004790234 0.006353084
## 4     Lagothrix tschudii  Lagothrix flavicauda 0.010857663 0.015799487
## 5     Lagothrix tschudii      Lagothrix lugens 0.008942665 0.009793415
## 6    Lagothrix poeppigii Lagothrix lagothricha 0.009935488 0.010263990
## 7    Lagothrix poeppigii        Lagothrix cana 0.013472226 0.013889494
## 8    Lagothrix poeppigii  Lagothrix flavicauda 0.007143983 0.008576839
## 9    Lagothrix poeppigii      Lagothrix lugens 0.004687637 0.005239657
## 10 Lagothrix lagothricha        Lagothrix cana 0.006982248 0.016395772
## 11 Lagothrix lagothricha  Lagothrix flavicauda 0.016864079 0.021577805
## 12 Lagothrix lagothricha      Lagothrix lugens 0.004613552 0.004711419
## 13        Lagothrix cana  Lagothrix flavicauda 0.010248512 0.018571383
## 14        Lagothrix cana      Lagothrix lugens 0.011431287 0.012798048
## 15  Lagothrix flavicauda      Lagothrix lugens 0.003130870 0.012472284
##              3           4           5           6           7          8
## 1  0.009119622 0.009424882 0.009501929 0.011133403 0.011531064 0.01218601
## 2  0.013305101 0.013619030 0.014312064 0.014917484 0.015322777 0.01616149
## 3  0.009876646 0.011018230 0.015174854 0.015558040 0.015750319 0.01593569
## 4  0.017303533 0.018780926 0.024484409 0.025068765 0.026791848 0.03064631
## 5  0.010007357 0.010233933 0.013108088 0.013569285 0.013683768 0.01369242
## 6  0.012882556 0.013299644 0.013483252 0.013543782 0.014419014 0.01551634
## 7  0.018047374 0.019166650 0.020079695 0.020482416 0.020934840 0.02110925
## 8  0.009326279 0.009438181 0.011184177 0.011547453 0.012062960 0.01273251
## 9  0.008928139 0.009957405 0.009985113 0.010153003 0.010213555 0.01035049
## 10 0.018770549 0.019660161 0.020440281 0.020886719 0.021753881 0.02200656
## 11 0.028039643 0.030626458 0.031666881 0.032421359 0.032751550 0.03319820
## 12 0.007356350 0.007522904 0.007544909 0.007824668 0.008278999 0.00836267
## 13 0.020955435 0.022106409 0.022549325 0.023428704 0.023685164 0.02617176
## 14 0.015011306 0.015079540 0.015775614 0.016083733 0.016322671 0.01665679
## 15 0.012971463 0.013149909 0.016707455 0.017637122 0.018198147 0.02017334
##              9          10          11         12         13         14
## 1  0.012967222 0.013930117 0.015460532 0.01590151 0.01637861 0.01655817
## 2  0.016290687 0.016422697 0.016808432 0.01716319 0.01746919 0.01795374
## 3  0.016011993 0.016214809 0.016235044 0.01636471 0.01672172 0.01673855
## 4  0.030891742 0.033146910 0.035598706 0.03577834 0.03656946 0.03717612
## 5  0.013889973 0.014124548 0.014179886 0.01432136 0.01480844 0.01531471
## 6  0.016538485 0.016815522 0.016940545 0.01805068 0.01812443 0.01824520
## 7  0.022564573 0.023061042 0.023081848 0.02326372 0.02354626 0.02356622
## 8  0.017984562 0.019709147 0.020301217 0.02099235 0.02176247 0.02337725
## 9  0.010767577 0.011093344 0.011268706 0.01147861 0.01185046 0.01189151
## 10 0.023073163 0.023447999 0.023942371 0.02421107 0.02483474 0.02574861
## 11 0.040121100 0.040133096 0.042367440 0.04272653 0.04280445 0.04340474
## 12 0.008380788 0.008799631 0.009683807 0.01065278 0.01072611 0.01078350
## 13 0.027149597 0.032305912 0.032651842 0.03313837 0.03391604 0.03429349
## 14 0.019495147 0.020342084 0.021127188 0.02112750 0.02116637 0.02144253
## 15 0.020618045 0.023796449 0.024001164 0.02470141 0.02598096 0.02666818
##            15         16         17         18         19         20         21
## 1  0.01679976 0.01686353 0.01718809 0.01750706 0.01876965 0.01886657 0.01897668
## 2  0.01805142 0.01809483 0.01942157 0.01991242 0.02021971 0.02030835 0.02072546
## 3  0.01682643 0.01694041 0.01710655 0.01711899 0.01713602 0.01830886 0.01845679
## 4  0.03935860 0.03946874 0.04002647 0.04002761 0.04016447 0.04095675 0.04222122
## 5  0.01535212 0.01572747 0.01616264 0.01651479 0.01686966 0.01697052 0.01705835
## 6  0.01828521 0.01849970 0.01863665 0.01873387 0.01890406 0.01894174 0.01931536
## 7  0.02387941 0.02414267 0.02515525 0.02545515 0.02640231 0.02761326 0.02806603
## 8  0.02363675 0.02465306 0.02490788 0.02567379 0.02579322 0.02593829 0.02625190
## 9  0.01229731 0.01273594 0.01370442 0.01384082 0.01393895 0.01413418 0.01422818
## 10 0.02623775 0.02778891 0.02804860 0.02809669 0.02914813 0.03066511 0.03076898
## 11 0.04352301 0.04477682 0.04528696 0.04582559 0.04824583 0.04890509 0.04900003
## 12 0.01078998 0.01095980 0.01114861 0.01118712 0.01135211 0.01141646 0.01189903
## 13 0.03443363 0.03697010 0.03737731 0.03779877 0.03861500 0.04070029 0.04120271
## 14 0.02170575 0.02229536 0.02319483 0.02359317 0.02391871 0.02406979 0.02423232
## 15 0.02829820 0.02848169 0.03039812 0.03046344 0.03063199 0.03231644 0.03285794
##            22         23         24         25         26         27         28
## 1  0.02016792 0.02018300 0.02056327 0.02139203 0.02153580 0.02158664 0.02179264
## 2  0.02088736 0.02238445 0.02304645 0.02311316 0.02338421 0.02406253 0.02419489
## 3  0.01867877 0.01941554 0.01973407 0.02001781 0.02006278 0.02145332 0.02150648
## 4  0.04277359 0.04369738 0.04374995 0.04455446 0.04463104 0.04564177 0.04820740
## 5  0.01788154 0.01835310 0.01848129 0.01851377 0.01877446 0.01882503 0.01883901
## 6  0.02035848 0.02052268 0.02079579 0.02081240 0.02108567 0.02113078 0.02123919
## 7  0.02832936 0.02857238 0.02877014 0.02885190 0.02887960 0.02944926 0.02958967
## 8  0.02667142 0.02723438 0.02750303 0.02763172 0.02991509 0.02999226 0.03119512
## 9  0.01423661 0.01447955 0.01448567 0.01492107 0.01509099 0.01514901 0.01548627
## 10 0.03079622 0.03085919 0.03122955 0.03150225 0.03193012 0.03227155 0.03238082
## 11 0.05045879 0.05127033 0.05254247 0.05262948 0.05327223 0.05381057 0.05597023
## 12 0.01190913 0.01233364 0.01234844 0.01240934 0.01266722 0.01266874 0.01275831
## 13 0.04133709 0.04186836 0.04430171 0.04432735 0.04448665 0.04503833 0.04636864
## 14 0.02472380 0.02473797 0.02474307 0.02524577 0.02553046 0.02678523 0.02690137
## 15 0.03309572 0.03352273 0.03368263 0.03461612 0.03488611 0.03550584 0.03577687
##            29         30         31         32         33         34         35
## 1  0.02195508 0.02283534 0.02292492 0.02312265 0.02312433 0.02345978 0.02356395
## 2  0.02443673 0.02451237 0.02490947 0.02573751 0.02625528 0.02639654 0.02668682
## 3  0.02160152 0.02169089 0.02205217 0.02221255 0.02235035 0.02274707 0.02300690
## 4  0.04855533 0.04884771 0.04955695 0.04976959 0.04992672 0.05029116 0.05046257
## 5  0.01930167 0.01961618 0.02022537 0.02029210 0.02109199 0.02139450 0.02146177
## 6  0.02163432 0.02171144 0.02244188 0.02244789 0.02338917 0.02357722 0.02360624
## 7  0.03104435 0.03119892 0.03121112 0.03136697 0.03181818 0.03186985 0.03197213
## 8  0.03172350 0.03205111 0.03206790 0.03210268 0.03223512 0.03252399 0.03253043
## 9  0.01585324 0.01591225 0.01592756 0.01605928 0.01620936 0.01645016 0.01649940
## 10 0.03251720 0.03272394 0.03327623 0.03339105 0.03339814 0.03411029 0.03424901
## 11 0.05641268 0.05712334 0.05743746 0.05804873 0.05819330 0.05868603 0.05918576
## 12 0.01291034 0.01301268 0.01301396 0.01302729 0.01319860 0.01327094 0.01345968
## 13 0.04650522 0.04665946 0.04682474 0.04805895 0.04840722 0.04850753 0.04856972
## 14 0.02737937 0.02770980 0.02883990 0.02904208 0.02913661 0.02990257 0.03026683
## 15 0.03765060 0.03880908 0.03962007 0.04017552 0.04056795 0.04066378 0.04164128
##            36         37         38         39         40         41         42
## 1  0.02398414 0.02451603 0.02467419 0.02480413 0.02539531 0.02558289 0.02572153
## 2  0.02676960 0.02678996 0.02687212 0.02717832 0.02719516 0.02721641 0.02746100
## 3  0.02324141 0.02339202 0.02388717 0.02423345 0.02428792 0.02455975 0.02457826
## 4  0.05067947 0.05175330 0.05277869 0.05337185 0.05346672 0.05417964 0.05429567
## 5  0.02153165 0.02186674 0.02214836 0.02256126 0.02262884 0.02279767 0.02288891
## 6  0.02380205 0.02399594 0.02411351 0.02434948 0.02487117 0.02506127 0.02586835
## 7  0.03237770 0.03290411 0.03290683 0.03302199 0.03319505 0.03326657 0.03363235
## 8  0.03341817 0.03426129 0.03482898 0.03557982 0.03594499 0.03642504 0.03662317
## 9  0.01660675 0.01705241 0.01707607 0.01750056 0.01753757 0.01766128 0.01781641
## 10 0.03432045 0.03442109 0.03462731 0.03511443 0.03634725 0.03689618 0.03749073
## 11 0.05927362 0.06000096 0.06087398 0.06088395 0.06088583 0.06149729 0.06207222
## 12 0.01389455 0.01434426 0.01443008 0.01461579 0.01510065 0.01513655 0.01526531
## 13 0.04896571 0.04914843 0.04916809 0.05065197 0.05066343 0.05103284 0.05160048
## 14 0.03060810 0.03129119 0.03131423 0.03155986 0.03191337 0.03209370 0.03331312
## 15 0.04281637 0.04334536 0.04336784 0.04430238 0.04448690 0.04456193 0.04492187
##            43         44         45         46         47         48         49
## 1  0.02579434 0.02586135 0.02586394 0.02594655 0.02609478 0.02618216 0.02655033
## 2  0.02825869 0.02905385 0.02945033 0.02959276 0.02961855 0.02976452 0.02989001
## 3  0.02519554 0.02545389 0.02547470 0.02551424 0.02564406 0.02600218 0.02614032
## 4  0.05445935 0.05522341 0.05528099 0.05693042 0.05712578 0.05743308 0.05765571
## 5  0.02296495 0.02326687 0.02331195 0.02368242 0.02420969 0.02435588 0.02439852
## 6  0.02588798 0.02604725 0.02615670 0.02617609 0.02640418 0.02647722 0.02655727
## 7  0.03400927 0.03434067 0.03445066 0.03454578 0.03474263 0.03479995 0.03482522
## 8  0.03689671 0.03809786 0.03858998 0.03898718 0.03906321 0.03932847 0.03997796
## 9  0.01792972 0.01821642 0.01823850 0.01827345 0.01828482 0.01870786 0.01871198
## 10 0.03808525 0.03857464 0.03860110 0.03877171 0.03890915 0.03901844 0.03902170
## 11 0.06263648 0.06292414 0.06294392 0.06316385 0.06346768 0.06358535 0.06367388
## 12 0.01545799 0.01556823 0.01570136 0.01598362 0.01607441 0.01623619 0.01652176
## 13 0.05283932 0.05288672 0.05312434 0.05338609 0.05343161 0.05379166 0.05385722
## 14 0.03419997 0.03428893 0.03450943 0.03537361 0.03544080 0.03551240 0.03623776
## 15 0.04518664 0.04554786 0.04601394 0.04633168 0.04727884 0.04755295 0.04807692
##            50         51         52         53         54         55         56
## 1  0.02680224 0.02705788 0.02713278 0.02728530 0.02735392 0.02780309 0.02791140
## 2  0.03012466 0.03040302 0.03063152 0.03064619 0.03078663 0.03145227 0.03175229
## 3  0.02615662 0.02645402 0.02711870 0.02728953 0.02762963 0.02797265 0.02800880
## 4  0.05837684 0.05837798 0.05850165 0.05857364 0.05883252 0.05908546 0.05993341
## 5  0.02485828 0.02491351 0.02496693 0.02498696 0.02499807 0.02500241 0.02510828
## 6  0.02668061 0.02702160 0.02717419 0.02775057 0.02780062 0.02781329 0.02837638
## 7  0.03500171 0.03504330 0.03507312 0.03524715 0.03565310 0.03571900 0.03597777
## 8  0.04057502 0.04069548 0.04072987 0.04098104 0.04120333 0.04137642 0.04202661
## 9  0.01911437 0.01917366 0.01919277 0.01934765 0.01937756 0.01945383 0.01959774
## 10 0.03945045 0.03996671 0.04102821 0.04219339 0.04221326 0.04229748 0.04230521
## 11 0.06454911 0.06506514 0.06511599 0.06564777 0.06672397 0.06739009 0.06751948
## 12 0.01653036 0.01669424 0.01669806 0.01676050 0.01693161 0.01700852 0.01735764
## 13 0.05389864 0.05449464 0.05511702 0.05529714 0.05540548 0.05641408 0.05762394
## 14 0.03634421 0.03653365 0.03680973 0.03735053 0.03763952 0.03767782 0.03780612
## 15 0.04863029 0.04924308 0.04937334 0.04947170 0.04980405 0.04981388 0.05037089
##            57         58         59         60         61         62         63
## 1  0.02841576 0.02847185 0.02883640 0.02911273 0.02920187 0.02922257 0.02937545
## 2  0.03178098 0.03183858 0.03189905 0.03220847 0.03289238 0.03326111 0.03341570
## 3  0.02815074 0.02873815 0.02874887 0.02923246 0.03065808 0.03096044 0.03126535
## 4  0.06033415 0.06039762 0.06044487 0.06104204 0.06137777 0.06188548 0.06245937
## 5  0.02533189 0.02542155 0.02575064 0.02576367 0.02589416 0.02625706 0.02634909
## 6  0.02851626 0.02869232 0.02881245 0.02890281 0.02894567 0.02907878 0.02909744
## 7  0.03660226 0.03667908 0.03731778 0.03734750 0.03844244 0.03919988 0.03920652
## 8  0.04239927 0.04240948 0.04381557 0.04405125 0.04431194 0.04589306 0.04755230
## 9  0.01982559 0.02015296 0.02028246 0.02028407 0.02047012 0.02052928 0.02054663
## 10 0.04252222 0.04260020 0.04298822 0.04339097 0.04412594 0.04475141 0.04511249
## 11 0.06803608 0.06914708 0.07014092 0.07026444 0.07084757 0.07257151 0.07271026
## 12 0.01736437 0.01762673 0.01764154 0.01778222 0.01805093 0.01812767 0.01818771
## 13 0.05811150 0.05815140 0.05819955 0.05948666 0.05952011 0.05980006 0.05985816
## 14 0.03879504 0.03890627 0.03907269 0.03918353 0.03921415 0.03943120 0.03953740
## 15 0.05089059 0.05249779 0.05252347 0.05255031 0.05257137 0.05265655 0.05267265
##            64         65         66         67         68         69         70
## 1  0.02969727 0.02972721 0.02985863 0.03009229 0.03015893 0.03044530 0.03065394
## 2  0.03352471 0.03403694 0.03449001 0.03480959 0.03481050 0.03489565 0.03572463
## 3  0.03152637 0.03213703 0.03214295 0.03253437 0.03341378 0.03385141 0.03456975
## 4  0.06262980 0.06348919 0.06399265 0.06410634 0.06532029 0.06564521 0.06626776
## 5  0.02641398 0.02717821 0.02739029 0.02834299 0.02851997 0.02956536 0.02966889
## 6  0.02918733 0.02924513 0.02931359 0.03001011 0.03007819 0.03037316 0.03060129
## 7  0.03925778 0.03977926 0.04014339 0.04020194 0.04068383 0.04087303 0.04153411
## 8  0.04842456 0.04881830 0.04893970 0.04969588 0.05009002 0.05030862 0.05045787
## 9  0.02060559 0.02071781 0.02111949 0.02118920 0.02126953 0.02152849 0.02156693
## 10 0.04574342 0.04615407 0.04619712 0.04722544 0.04766956 0.04771611 0.04797143
## 11 0.07279433 0.07302354 0.07316346 0.07351240 0.07416327 0.07438362 0.07468959
## 12 0.01821758 0.01825735 0.01832726 0.01840909 0.01847933 0.01889193 0.01919812
## 13 0.06090389 0.06100894 0.06167020 0.06177206 0.06207028 0.06212052 0.06215380
## 14 0.03994112 0.04039464 0.04040365 0.04075720 0.04085790 0.04134926 0.04158417
## 15 0.05363711 0.05366810 0.05373925 0.05439609 0.05544148 0.05545794 0.05592531
##            71         72         73         74         75         76         77
## 1  0.03068629 0.03075228 0.03139204 0.03209904 0.03259105 0.03283378 0.03312080
## 2  0.03624558 0.03671873 0.03731816 0.03819205 0.03868003 0.03891786 0.04021064
## 3  0.03459612 0.03483602 0.03544838 0.03643168 0.03675928 0.03688960 0.03697153
## 4  0.06654999 0.06657467 0.06756684 0.06784813 0.06897390 0.06922710 0.06954627
## 5  0.02983246 0.02989230 0.03017127 0.03029862 0.03030367 0.03053870 0.03154607
## 6  0.03091858 0.03135039 0.03155956 0.03163422 0.03178327 0.03212442 0.03247184
## 7  0.04153688 0.04173719 0.04217168 0.04297006 0.04344177 0.04380295 0.04431505
## 8  0.05065774 0.05274828 0.05310782 0.05367594 0.05367981 0.05502307 0.05505699
## 9  0.02195167 0.02225272 0.02232090 0.02239077 0.02265939 0.02280237 0.02321550
## 10 0.04817141 0.04835959 0.04838760 0.04864807 0.04892830 0.04939131 0.04988425
## 11 0.07487562 0.07680147 0.07682535 0.07731085 0.07732152 0.07765648 0.07770342
## 12 0.01937334 0.01944412 0.01947779 0.01958378 0.02017355 0.02017871 0.02045443
## 13 0.06244829 0.06339417 0.06345333 0.06393030 0.06447116 0.06451855 0.06616866
## 14 0.04168410 0.04180444 0.04213444 0.04287506 0.04417467 0.04431213 0.04449527
## 15 0.05678377 0.05754213 0.05760369 0.05965293 0.06044185 0.06071346 0.06082215
##            78         79         80         81         82         83         84
## 1  0.03317037 0.03353697 0.03389141 0.03389799 0.03396878 0.03399351 0.03423556
## 2  0.04045128 0.04054722 0.04068998 0.04111931 0.04115460 0.04119290 0.04129278
## 3  0.03765323 0.03772726 0.03813972 0.03837245 0.03915877 0.03968073 0.03979694
## 4  0.07000245 0.07017772 0.07159711 0.07219644 0.07219908 0.07240078 0.07310216
## 5  0.03186969 0.03215928 0.03216421 0.03217467 0.03220707 0.03224938 0.03235865
## 6  0.03316144 0.03324024 0.03352239 0.03459977 0.03478133 0.03499654 0.03523581
## 7  0.04460110 0.04581403 0.04682519 0.04686564 0.04730168 0.04757534 0.04773930
## 8  0.05558057 0.05583654 0.05593816 0.05639765 0.05748532 0.05829813 0.05868393
## 9  0.02339345 0.02343040 0.02350868 0.02383726 0.02386990 0.02469147 0.02486206
## 10 0.05003152 0.05056182 0.05078369 0.05097449 0.05238160 0.05399131 0.05521128
## 11 0.07788511 0.07816673 0.07977860 0.08052591 0.08194985 0.08203504 0.08235781
## 12 0.02046186 0.02066133 0.02085417 0.02106148 0.02108929 0.02224175 0.02238518
## 13 0.06620468 0.06628318 0.06714651 0.06818070 0.06873799 0.06956137 0.07002885
## 14 0.04480401 0.04539035 0.04541932 0.04552201 0.04586960 0.04707067 0.04735766
## 15 0.06147114 0.06194003 0.06200615 0.06230974 0.06307339 0.06401547 0.06455989
##            85         86         87         88         89         90         91
## 1  0.03561282 0.03624687 0.03626291 0.03684152 0.03707525 0.03790644 0.03889516
## 2  0.04170902 0.04233592 0.04246359 0.04353143 0.04408959 0.04449044 0.04452616
## 3  0.04025575 0.04028834 0.04054265 0.04096598 0.04170355 0.04177840 0.04180565
## 4  0.07338964 0.07372322 0.07430777 0.07580474 0.07836847 0.08037927 0.08172216
## 5  0.03236365 0.03281117 0.03317662 0.03450029 0.03479743 0.03504672 0.03524925
## 6  0.03530462 0.03666411 0.03845404 0.03881034 0.03890181 0.03965466 0.03974629
## 7  0.04830749 0.04876352 0.04894180 0.04973783 0.05063955 0.05132480 0.05295590
## 8  0.05972064 0.05974377 0.05995357 0.05998450 0.06051068 0.06086722 0.06112344
## 9  0.02541886 0.02545904 0.02674657 0.02685738 0.02726799 0.02728833 0.02779064
## 10 0.05553015 0.05647787 0.05666331 0.05697741 0.05732761 0.05889979 0.06199469
## 11 0.08381701 0.08382303 0.08479167 0.08568095 0.08714054 0.08829666 0.09156781
## 12 0.02277848 0.02316061 0.02323722 0.02380345 0.02418650 0.02435880 0.02535311
## 13 0.07012118 0.07130123 0.07187496 0.07259815 0.07433378 0.07553886 0.07588758
## 14 0.04791661 0.04893207 0.05012384 0.05037006 0.05051814 0.05058228 0.05067050
## 15 0.06487805 0.06524112 0.06823758 0.06829088 0.06981657 0.07141524 0.07192039
##            92         93         94         95         96         97         98
## 1  0.03914456 0.03935779 0.03989152 0.04024389 0.04028462 0.04258626 0.04342332
## 2  0.04493733 0.04637637 0.04649922 0.04788757 0.05059019 0.05097278 0.05206863
## 3  0.04242937 0.04281872 0.04283855 0.04340324 0.04492996 0.04740234 0.04747548
## 4  0.08353711 0.08522026 0.08621313 0.08709573 0.08936948 0.09189718 0.09202559
## 5  0.03695699 0.03700782 0.03713949 0.03728952 0.03959136 0.04083186 0.04237767
## 6  0.04001411 0.04047102 0.04109714 0.04147171 0.04229100 0.04247743 0.04297473
## 7  0.05315235 0.05386294 0.05427788 0.05758748 0.05782243 0.06004339 0.06017771
## 8  0.06284582 0.06293648 0.06334358 0.06663474 0.06954427 0.07232780 0.07808394
## 9  0.02794432 0.02817347 0.02868881 0.02891343 0.03014202 0.03080743 0.03096113
## 10 0.06231258 0.06313790 0.06345148 0.06535198 0.06555834 0.06589426 0.06907422
## 11 0.09202315 0.09274468 0.09502386 0.09532442 0.09597812 0.10312606 0.10835419
## 12 0.02543798 0.02557136 0.02618679 0.02655431 0.02678929 0.02712991 0.02784947
## 13 0.07623787 0.07770187 0.08043097 0.08259319 0.08977525 0.09085221 0.09101638
## 14 0.05083920 0.05292557 0.05325874 0.05375813 0.05375939 0.05404826 0.05676323
## 15 0.07210031 0.07407616 0.07474902 0.07534396 0.07610910 0.07869482 0.08381534
##            99        100 Lower bound CI limit Upper bound CI limit p-value
## 1  0.04514442 0.04847449          0.009119622           0.04258626       0
## 2  0.05235285 0.05844723          0.013305101           0.05097278       0
## 3  0.05549714 0.06063099          0.009876646           0.04740234       0
## 4  0.09595997 0.09724464          0.017303533           0.09189718       0
## 5  0.04591213 0.04796522          0.010007357           0.04083186       0
## 6  0.04431884 0.05312549          0.012882556           0.04247743       0
## 7  0.06899641 0.07465226          0.018047374           0.06004339       0
## 8  0.08323791 0.08556721          0.009326279           0.07232780       0
## 9  0.03159270 0.03542267          0.008928139           0.03080743       0
## 10 0.07005831 0.08059029          0.018770549           0.06589426       0
## 11 0.11016995 0.11022265          0.028039643           0.10312606       0
## 12 0.02978989 0.03763004          0.007356350           0.02712991       0
## 13 0.09141845 0.09574520          0.020955435           0.09085221       0
## 14 0.06060720 0.07898313          0.015011306           0.05404826       0
## 15 0.08670084 0.09652050          0.012971463           0.07869482       0
##           Fst
## 1  0.02607980
## 2  0.03132779
## 3  0.02712932
## 4  0.05798241
## 5  0.02542713
## 6  0.02741285
## 7  0.03573399
## 8  0.04143169
## 9  0.01922409
## 10 0.04122628
## 11 0.06622645
## 12 0.01802962
## 13 0.05395207
## 14 0.03576527
## 15 0.04852172

Ok…

DAPC for fun!

Just for fun - let’s do a DAPC:

dapc2 <- dapc(lagomito.gen2, n.pca = 2, n.da = 2)

scatter(dapc2, cex = 2, legend = TRUE, clabel = F, posi.leg = "bottomleft", scree.pca = FALSE,
        posi.pca = "topright", cleg = 0.75, col=c("green","yellow","dodgerblue","black","red3","hotpink"))

huh… ok. So taxa appear to generally be clumping together, which is potentially good, with occasional individuals that are crossing boundaries, but that’s also seen in the original publication. It looks here like lagothricha is nested together with lugens and poeppigii. Strangely, flavicauda and tschudii are clumped together, between cana and the lagothricha/poeppigii/lugens clade. I wonder if the flavicauda clumping with tschudii suggests introgression? Or maybe convergence due to high elevations?

Let’s take a look…

Lagothrix Phylogeny

Maximum-Likelihood

So for the phylogeny, let’s start out with a ML model using raxml-ng. Unfortunately, there is not yet an r-based interface for this updated version of raxml, so this will have to be done on the command line.

Let’s first export our alignment to a FASTA file that raxml-ng can access:

library(Biostrings)
writeXStringSet(lagomito.aln2.2019,"/Users/christopheraschmitt/Desktop/woolly_genomics/mitogenomes/phylomitogenomics/lagomito.aln2.2019.fasta",format="fasta")

Then, we can do a quick and dirty phylogenetic analysis in raxml-ng, doing our best to follow the parameters of the Ruiz-Garcia paper… you can see some basics on how to use raxml-ng here:

raxml-ng --msa lagomito.aln2.2019.fasta --tree pars{25},rand{25} --model GTR+G --bs-trees 500 --seed 214 --all

we can import the best tree here:

library(ggplot2)
library(ggtree)
library(treeio)

raxml<-read.newick("/Users/christopheraschmitt/Desktop/woolly_genomics/mitogenomes/phylomitogenomics/lagomito.aln2.2019.fasta.raxml.bestTree")

Let’s also merge our data with the tree:

x <- as_tibble(raxml)
popinfo2019.join<-dplyr:::mutate(popinfo2019,label=GenBank)

y <- full_join(x, popinfo2019.join, by = 'label')
lagtree<-as.treedata(y)

Let’s take a look at node and edge labels, respectively:

library(phytools)
## Loading required package: maps
## 
## Attaching package: 'maps'
## The following object is masked from 'package:purrr':
## 
##     map
## 
## Attaching package: 'phytools'
## The following object is masked from 'package:treeio':
## 
##     read.newick
plotTree(as.phylo(lagtree),node.numbers=TRUE)
edgelabels()

Let’s root the tree at Aotus:

lagtree2<-root(lagtree,node=213,edgelabel=FALSE,resolve.root=TRUE)
## The use of this method may cause some node data to become incorrect (e.g. bootstrap values) if 'edgelabel' is FALSE.

Let’s take a new look at node and edge labels, respectively:

library(phytools)
plotTree(as.phylo(lagtree2),node.numbers=TRUE)
edgelabels()

And now we can plot it, and highlight the nodes with appropriate colors:

ggtree(lagtree2,layout="circular") + geom_tiplab(aes(label=Taxon)) + geom_hilight(node=170, fill="dodgerblue", alpha=.6) + geom_hilight(node=118, fill="yellow", alpha=.6) + geom_hilight(node=158, fill="pink", alpha=.6) + geom_hilight(node=110, fill="green", alpha=.6) + geom_hilight(node=185, fill="gray20", alpha=.6) + geom_hilight(node=5, fill="red3", alpha=1)

Now… this is a problem… tschudii appears to be basal to the remaining Lagothrix, with cana being a basal outgroup, and flavicauda is basal to a clade comprised of poeppigii. This is clearly wrong… but what happened here that makes it so different from Ruiz-Garcia’s results?? We also have Ateles as the sister taxon to Lagothrix rather than Brachyteles (although Brachyteles is basal to this sister clade). This may just be due to gene-specific variation (this is only a fragment of COX2, after all), but it’s still a bit baffling… particularly given that Ruiz-Garcia’s results looked relatively more sensible (albeit with the added benefit of twice as much gene region, including apparently some COX1 data that is conspicuously missing from GenBank). We are not getting tschudii as amonophyletic clade!

Let’s bring in the bootstrap values and see what that can tell us…

lagtree.bs<-treeio::read.newick("/Users/christopheraschmitt/Desktop/woolly_genomics/mitogenomes/phylomitogenomics/lagomito.aln2.2019.fasta.raxml.support",node.label='support')

x <- as_tibble(lagtree.bs)
popinfo2019.join<-dplyr:::mutate(popinfo2019,label=GenBank)

y <- full_join(x, popinfo2019.join, by = 'label')
lagtree.bs<-as.treedata(y)
lagtree.bs2<-root(lagtree.bs,node=213,edgelabel=TRUE,resolve.root=TRUE)
ggtree(lagtree.bs2,layout="circular") + geom_tiplab(aes(label=Taxon)) + geom_hilight(node=170, fill="dodgerblue", alpha=.6) + geom_hilight(node=118, fill="yellow", alpha=.6) + geom_hilight(node=158, fill="pink", alpha=.6) + geom_hilight(node=110, fill="green", alpha=.6) + geom_hilight(node=185, fill="gray20", alpha=.6) + geom_hilight(node=5, fill="red3", alpha=1) + geom_nodelab(aes(label=support),hjust=-.3)

Ok so it looks like bootstrap support of these problem nodes is pretty low… the flavicauda node where it’s basal to the poeppigii clade is only 16 (and many within that clade have 0 support!); the cana clade has 88, but tschudii that’s basal to that is 32. Generally, we’ve got low support… I think these sequences are just too short and don’t have enough variation to distinguish the clades well. I really with Ruiz-Garcia has shared the whole sequences they worked with… Still, if we get a tschudii sequence of the same length, we should still be able to place it into the proper taxonomy given how strongly cana is clustering…

Bayesian (BEAST2)

For the Bayesian phylogeny, we’ll use BEAST2, as outlined in these helpful tutorials here.

First, we need to export our alignment as a NEXUS file:

ape::write.nexus.data(lagomito.aln2.2019, "/Users/christopheraschmitt/Desktop/woolly_genomics/mitogenomes/phylomitogenomics/mrbayes/lagomito.aln2.2019.nex", format = "dna")

From there, we can run the alignment through [BEAST2]. We can see from Ruiz-Garcia et al. the ways in which they modeled their data for the phylogeny, and we’ll create that in a moment.

For now, a quick and dirty phylogeny using standard settings gives us the following tree:

lagtree.beast<-treeio::read.beast("/Users/christopheraschmitt/Desktop/woolly_genomics/mitogenomes/phylomitogenomics/BEAST/lagomito_rough.tree")

x <- as_tibble(lagtree.beast)
popinfo2019.join<-dplyr:::mutate(popinfo2019,label=GenBank)

y <- full_join(x, popinfo2019.join, by = 'label')
lagtree.beast<-as.treedata(y)

Let’s take a look at nodes:

phytools::plotTree(as.phylo(lagtree.beast),node.numbers=TRUE)

And here we have the rough and ready tree, with the same color annotation:

ggtree(lagtree.beast,layout="circular") + geom_tiplab(aes(label=Taxon)) + geom_hilight(node=138, fill="dodgerblue", alpha=.6) + geom_hilight(node=153, fill="yellow", alpha=.6) + geom_hilight(node=126, fill="pink", alpha=.6) + geom_hilight(node=192, fill="green", alpha=.6) + geom_hilight(node=199, fill="gray20", alpha=.6) + geom_hilight(node=26, fill="red3", alpha=1)

Ok! This is much more sensible! Here we can see that flavicauda is basal to the Lagothrix clades, with a monophyletic cana as the next diverged clade, followed by tschudii as a monophyletic outgroup to the remaining northern taxa (poeppigii, and the lagothricha/lugens clades). Although this is much better, it still differs from the Ruiz-Garcia et al. tree, in which cana/tschudii were sister clades, and Brachyteles was the immediate outgroup to Lagothrix, nested within Ateles (which is understood to be the correct phylogenetic order using larger genetic systems).

This can potentially be fixed by using similar settings to Ruiz-Garcia et al… let’s try. This would include modeling position-in-codon separately, with 6 MCMC chains sampled every 10,000 generations for 30 million generations after a burn-in of 3 million generations. They also plotted likelihood vs. generation to estimate the effective sample size (which they note as over 200) to determine convergence, and combined the results of the four independent analyses using LogCombiner/TreeAnnotator. They used a Yule speciation model and a relaxed molecular clock with an uncorrelated log-normal rate of distribution, with posterior probabilities used to indicate node support.

You can see how to annotate the coding vs. non-coding regions and position-in-codon partitions in the primate-mtDNA.nex file. This is at the bottom of that NEXUS file with the code:

begin assumptions;
    charset noncoding = 1 458-659 897-898;
    charset 1stpos = 2-457\3 660-896\3;
    charset 2ndpos = 3-457\3 661-896\3;
    charset 3rdpos = 4-457\3 662-.\3;

    exset noncoding = 1stpos 2ndpos 3rdpos;

In which charset noncoding gives all the positions that are non-coding in the file, with each block of non-coding DNA separated by a space. Same for the coding positions, which the positions of the gene regions are entered, divided by 3, with each starting at the respective first example of the first, second, or third position in a codon from the first position in the gene to the third, respectively. This can be done manually, but can also be set up in BEAUti (details here).

In this dataset, I’m being lazy and assuming that all of this sequence is COX2 coding sequence. That may not be the case. To find out, I’d need to run an alignmnet of these data with an annotated reference and visualize it to find out which positions are actually coding and which are non-coding, and define them as such in the file. I don’t have time for that just now, but if we want to published this with the woolly sequence from Laura Abondano, we’d need to do that!

Ok, did my best to replicate what Ruiz-Garcia et al. did… here goes:

lagtree2.beast<-treeio::read.beast("/Users/christopheraschmitt/Desktop/woolly_genomics/mitogenomes/phylomitogenomics/BEAST/lagomito2.tree")

x <- as_tibble(lagtree2.beast)
popinfo2019.join<-dplyr:::mutate(popinfo2019,label=GenBank)

y <- full_join(x, popinfo2019.join, by = 'label')
lagtree2.beast<-as.treedata(y)

Let’s take a look at nodes:

phytools::plotTree(as.phylo(lagtree2.beast),node.numbers=TRUE)

Let’s re-root:

lagtree3.beast<-root(lagtree2.beast,node=123,edgelabel=TRUE,resolve.root=TRUE)

And here we have the attempted replication tree, with the same color annotation:

ggtree(lagtree3.beast,layout="circular") + geom_tiplab(aes(label=Taxon)) + geom_hilight(node=139, fill="dodgerblue", alpha=.6) + geom_hilight(node=154, fill="yellow", alpha=.6) + geom_hilight(node=127, fill="pink", alpha=.6) + geom_hilight(node=208, fill="green", alpha=.6) + geom_hilight(node=195, fill="gray20", alpha=.6) + geom_hilight(node=26, fill="red3", alpha=1)

Ok, this is more or less the same… we’ve now got the sister clade status for cana/tschudii, which is good, but now flavicauda is the outgroup just for the cana/tschudii clade, which is not good.

No perfect solutions here, which again may reflect 1) my laziness in not specifying coding/non-coding regions and codon positions, 2) the shortness of this partial COX2 fragment and so lacking the full dataset that Ruiz-Garcia et al. used. At least, in this case, we can be fairly confident that these data should allow us to publishably assign a fragment confidently to either cana or tschudii for the Abondano sample, which is a win!

Note that if you want clade credibility support you can check out the Visualising tree posteriors (optional) section of the BEAST2 tutorials to see how. In this case, we get 97% clade credibility for all of the tschudii clustering together monophyletically, which ain’t bad, we also get 99% clade credibility for monophyletic cana, which is great, and 77% clade credibility for them being sister clades. Interestingly, there’s only a 15% crediblity of flavicauda being the outgroup of this clade specificly, despite that being in the consensus tree. Unfortunately, this method of investigating clade credibility is a bit cumbersome with such a dense/branch-filled tree! Clearly we need a larger portion of the mitogenome to get a more appropriate sense of flavicauda’s placement, and as Ruiz-Garcia point out (their ML tree showed a similar topology) this offers a potentially intriguing interpretation of cana/tschudii/flavicauda and the Andes more generally being an origin for Lagothrix.